copyright year as variable for many pages

2 replies · opened Feb 19, 2024

Ddendaashans-peterFeb 19, 2024

Hello,

in my footer I have a copyright statement including the year.

<p>
© 2024 MyCompany
</p>

As my site consists of many pages I would like to use a vaiable that can be read by all those pages. How do I do this?

I have a similar question for the menu that is reused on all those pages. Change the menu means I have to revisit all those files...

thank you for your help.

Hans-Peter

SSemicolon WebSTAFFFeb 28, 2024

Hello,

Thanks for your Patience!

  1. This is Definitely Possible, however, there are some changes that are required. Consider using the following HTML format for the Copyrights Text:
    [ch_pre]Copyrights © All Rights Reserved by Canvas Inc.[/ch_pre]

Then use the update the js/functions.bundle.js JS File as attached to this reply.

  1. This is Definitely Possible but you will need to use PHP instead by having a Centralized File for the Menu. Please use the following steps:

i. Change the .html Extension of your files to .php .

ii. Create a File named header.php and add the Header Codes to it.

iii. Then, include this file in the Header Area. Example:
[ch_pre type="php"]<?php include('header.php'); ?>[/ch_pre]

That's it. Now all your Pages will have the same Header Codes which can be changed only in one File. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Ddendaashans-peterMar 27, 2024

Thank you! I was even slower... Your solution for the header is very useful! I have more repetitive components on my pages that I can address similarly. The footer with the copyright will be tackled the same way.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard