Variable topic links

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

Moderators: Alexander Halser, Tim Green

Post Reply
Louise Schelin
Posts: 10
Joined: Thu Sep 24, 2015 1:46 pm

Variable topic links

Unread post by Louise Schelin »

Hi,
I have a page that contains a lot of text and some images. This page is needed in four places in my project, BUT each page needs a different link in it. I was wondering if it's possible to use a variable as a link?

So I would have my page as a snippet, where I have a variable instead of the link. Then create four "empty" pages that include the snippet, and have different variable values set. I am currently using this method for a few pages where I need to change some words, not links.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variable topic links

Unread post by Tim Green »

Hi Louise,

Yes, this is possible. To do this you need to use the variable as the target of the link, not as the complete link, because variables are plain text. Also make sure that you define the variable as "HTML" and not as "TEXT". Then you can create a web link and instead of the address you type in <%VARIABLE_NAME%>. To change the target of the link you then add the variable as a topic variable in the Topic Options tab and enter the new address.

Don't forget to include the http:// prefix, otherwise it won't work correctly.
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.
Louise Schelin
Posts: 10
Joined: Thu Sep 24, 2015 1:46 pm

Re: Variable topic links

Unread post by Louise Schelin »

That is great! But is it possible to do the same with a topic link? When I try it complains that I cannot have % in the target..
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variable topic links

Unread post by Tim Green »

Hi Louise,

No, this isn't possible with topic links. To do that at the moment you need to use conditional text: You create two versions of the link and use conditional text build options to select either one or the other.
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.
Post Reply