Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Includes and Tags

Quote Reply
Includes and Tags
Hi all,
has someone a solution how to bind in include-files?

Normally it goes:

<%include header.txt%>
...
<%include footer.txt%>

For an easy random-text i would like to use:

<%include footer<%rand_footer%>.txt%>

Hmm, think that wont fit, but maybe:

<%if random_footer eq '1'%>
<%include footer1.txt%>
<%endif%>
...

Think thatīs the way. I will try it in a minute.

Robert

Quote Reply
Re: Includes and Tags In reply to
Hi Robert, If you've got the Enhanced Templates parse sub installed...

You can do what you want by using:
<%include footer<<rand_footer>>.txt%>

Though there is a warning on using this feature due to it's high overhead and double parsing of every tamplate during the build process.

Quote Reply
Re: Includes and Tags In reply to
phoule,

Please pay closer attention to the Forum titles...Links SQL already contains similar codes available in the Enhanced Template.pm module. Links SQL does NOT need this code hack. Links 2.0 does..which this forum does not deal with.

Regards,

Eliot Lee
Quote Reply
Re: Includes and Tags In reply to
Do you mean, this feature is buildin in LSQL?
I have done it with another way; if var = x then html; so it works for me.

Quote Reply
Re: Includes and Tags In reply to
My bad, but I remember having to put the Enhanced Template parser in to LinkSQL 1.1b3 myself...so I could use this 'built in' feature. Maybe there is an easier and built in way to use it, but I never found it. Though, Now, I am curious as to how to get this working...well will look around and try and find the answer.