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.
Variable topic links
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 23157
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Variable topic links
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.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 10
- Joined: Thu Sep 24, 2015 1:46 pm
Re: Variable topic links
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..
- Tim Green
- Site Admin
- Posts: 23157
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Variable topic links
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.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.