Adding a Copyright to the project

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Adding a Copyright to the project

Unread post by Erich Carshagen »

Hi all,

Our help file is over 600 topics and i have to manually add <%Copyright%> at the bottom of each page. I can see in the HTML Page templates that I can add HTML tags below the topic which will auto populate the Copyright at the bottom of each page. We are using the CHM Skin, Dark blue, and I would like to add the copy right to the template so that I don't need to add it after every topic. Any advice on what and where to change the Dark Blue template?

Thanks
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Adding a Copyright to the project

Unread post by Tim Green »

Hi Erich,

You definitely don't need to add it to every single page! :) This is easy to do by editing your skin. Open the .hmskin file in Help+Manual and in the Project Explorer on the left navigate down to Configuration > HTML Page Templates > Default. In the source code tab locate the <%TOPIC_TEXT%> variable. That is what inserts the HTML version of your topic in the template, so everything you insert after that becomes a footer.

Then you just need to insert a paragraph with the copyright variable directly below the topic text variable, for example:

<%TOPIC_TEXT%>
<p style="font-family: 'MS Trebuchet', Arial, Helvetica; font-size: 1rem; font-color: silver; font-style: italic;"><%COPYRIGHT%></p>


Alternatively, you can also do it like this to use a paragraph style defined in your project (the style name must NOT contain any spaces!). This example would be for a paragraph style called FooterStyle:

<%TOPIC_TEXT%>
<p class="p_FooterStyle"><span class="f_FooterStyle"><%COPYRIGHT%><span></p>


You need the two separate class references as shown, with a p_ in front of the style name in the paragraph tag and an f_ in front of the style name in the <span> tag.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Re: Adding a Copyright to the project

Unread post by Erich Carshagen »

Thanks Tim. Works like a charm!
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Re: Adding a Copyright to the project

Unread post by Erich Carshagen »

Apologies Tim, one more question: I know that we can add carriage returns or new lines, and i would like to add say 6 lines between the last line of text and the copyright. How would i go about doing that?
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Adding a Copyright to the project

Unread post by Tim Green »

Erich Carshagen wrote:Apologies Tim, one more question: I know that we can add carriage returns or new lines, and i would like to add say 6 lines between the last line of text and the copyright. How would i go about doing that?
There are a couple of ways to do this. You could just use line break tags, like this:

Code: Select all

<br /><br /><br /><br /><br /><br /><p ...
If you are using a style from your project you could define the "Space Before" attribute with sufficient space. Or if you are using the first option I showed you, you could add a "margin-top" attribute to add space before the paragraph, like this:

<%TOPIC_TEXT%>
<p style="margin-top: 30px;font-family: 'MS Trebuchet', Arial, Helvetica; font-size: 1rem; font-color: silver; font-style: italic;"><%COPYRIGHT%></p>


Just increase or decrease the "30px" value to change the amount of space. Note that there is a semi-colon (;) between the different attributes there. It won't work without it.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Re: Adding a Copyright to the project

Unread post by Erich Carshagen »

Thanks Tim. All sorted!
Post Reply