Using parameters in textarea field
This is an open discussion with no replies, filed under XSLT.
Search
Create an account or sign in to comment.
This is an open discussion with no replies, filed under XSLT.
Create an account or sign in to comment.
Quick Links
Symphony • Open Source XSLT CMS
--with-xsl
)
Hi!
I'd like to share with you about one case of using the ninja techniques. Maybe someone will find it usefull. Or, on the other hand, someone may offer a better way of achieving the same results.
The problem.
I have a section called 'banners' wich contains all the banners I want to display on my site. There are fields which define the placement of a banner (bottom, top, right), the pages on which it must be displayed, and the field of the textarea type which holds the html code.
So, I decided to use this 'banners' section for keeping the counter for my site, as well. The counter I decided to use ('www.liveinternet.ru') is offered in two parts - JS code, which is a counter itself, and an html code for outputting the info on the screen:
I decided not to use javascript in the counter, so I have combined these two parts in one:
So, as you see, the new code contains the {$current-url} tag which needs to be replaced by the $current-url parameter value later when preparing the page.
Solution
I just show the relevant xsl code which might be, probably, sufficient to get the idea about the solution I have come to:
So, that's how I've done it in my dilettant way.
I'm open for suggestions.