3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1329 Views |
-
how to print $ . in a template ?

27 May 2010 at 4:05am
hi
it is a big problem
i want to put in a template somethnig like this $URL
but '$ with words' executing the function or variable from databese
so how to print $URL like a simple text without using HTML Encoding Tags like %24 %24 = $ ?
another problem, how to print a dot ?
this problem appears in <a> tag
<a href="$Parent.URLSegment/$URLSegment.html">.html doesnt work becouse "." ".html" is treating like another function (?) to $URLSegment
so how to stop (?) rendering SS function and start print HTML character ?maby is there any escape character like ; \ / ? $URLSegment;.html $URLSegment\.html doesnt work too
at know i am using this $URLSegment%2Ehtml but in source i still have %2Ehtml and it is not very good in view Google Analytics
using SS 2.4
-
Re: how to print $ . in a template ?

27 May 2010 at 5:52am
<a href="$Parent.URLSegment/$URLSegment.html">
<a href="{$Parent.URLSegment}/{$URLSegment}.html">
-
Re: how to print $ . in a template ?

27 May 2010 at 6:34am
great !
where did you found it ?
could you give me a link to documentation ? -
Re: how to print $ . in a template ?

27 May 2010 at 8:13am
i've picked it up somewhere..?? but it's also in the comments here (bottom):
http://doc.silverstripe.org/templates -
Re: how to print $ . in a template ?

27 May 2010 at 1:17pm
I've added some notes and an example to http://doc.silverstripe.org/templates#escaping. Not sure if its 100% clear with the naming as escaping relates more specifically to escaping for attributes, xml, sql etc but couldn't think what else would make sense.
| 1329 Views | ||
|
Page:
1
|
Go to Top |



