How to insert identical code into the...

User 2220522 Photo


Registered User
49 posts

I need to use some analytics code in the head section of every page of my project. Is there a way to insert it globally, or do I have to open each page and insert one at a time? Can it be made into a symbol? Thanks for any help.
User 2088758 Photo


Senior Advisor
3,086 posts
Online Now

Hi Marty,

Not at this time. This is a highly requested feature that the CC team has said they would implement at some point. All you can do for now is copy and paste it to each page.
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 122279 Photo


Senior Advisor
14,450 posts
Online Now

We are waiting for an update of the programme where this has indeed been implemented. I've seen it.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2220522 Photo


Registered User
49 posts

Thanks guys. Hopefully it will arrive soon. :)
User 2839879 Photo


Registered User
99 posts

Here's what I do...

1. Once I've made the website in SDv3, I then switch over to CoffeeCup HTML Editor.
2. I change each page extension from .html to .php
3. I then add this line to each page where I want the code to go...
<?php require $_SERVER['DOCUMENT_ROOT']."/header.php"; ?>

4. I add a new page titled header.php. Add any coding here.
CoffeeCup Websites:
City Church Christchurch: https://city.org.nz
Champion Freight: https://www.championfreight.co.nz/
eChamp: https://echamp.co.nz/
Champion Containers: http://championcontainersnz.com/
User 379556 Photo


Registered User
1,535 posts

Happily the last two updates of SC V3 have included the facility in the Page Manager.

Frank

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.