Gossamer Forum
Home : Products : Gossamer Links : Discussions :

GT::Template Set

Quote Reply
GT::Template Set
Inside the templates, is there a way to get this to work the way this should logically:

<%set thetitle = "Link Listings for" . $Name . " Category"%>



??

Last edited by:

tpl: Jul 20, 2002, 4:02 PM
Quote Reply
Re: [tpl] GT::Template Set In reply to
<%set thetitle = "Link Listings for" . Username . " Category"%>
<%thetitle%>

Will print: Link Listings for" . Username . " Category

<%set thetitle = "Link Listings for $Username Category"%>
<%thetitle%>

Will print: Link Listings for $Username Category

Good point. Maybe you need nested tags:

<%set thetitle = "Link Listings for <%Username%> Category"%>
<%thetitle%>

Good questions, I would also like to know how to concatenate strings in tags. Tags can do math, but can they join strings? (sorry I did not answer yor question tpl)


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] GT::Template Set In reply to
no, you didn't, Smile
Quote Reply
Re: [,] GT::Template Set In reply to
I am also looking for this feature. Can someone (GT?) please tell whether it is possible or not?

Something like the following would be fine as well:
Code:
<% set thetitle = "Link Listings for "%>
<% set thetitle .= $name %>
<% set thetitle .= " Category"%>


Thanks, Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] GT::Template Set In reply to
Well you could do this...

<% set thestart = "Link Listings for "%>
<% set theend = " Category"%>

<%thestart%><%name%><%theend%>

Last edited by:

Paul: Jan 24, 2003, 9:13 AM
Quote Reply
Re: [,] GT::Template Set In reply to
Would the following be good enough?

Create a global called "cat" and it contains:

Code:
sub {
return join "", @_
};

Then you can write:

<title><%cat( "Link Listings for", $Name, " Category" )%></title>