Full URL as separate $params
This is an open discussion with no replies, filed under Troubleshooting.
Search
Create an account or sign in to comment.
This is an open discussion with no replies, filed under Troubleshooting.
Create an account or sign in to comment.
Quick Links
Symphony • Open Source XSLT CMS
--with-xsl
)
For the Symphony site I'm working on at the moment I needed to pull out the full URL at separate parameters, so I made a sketchy little custom DS to do so. I thought others might be interested in using the code — bear in mind I'm still pretty new to Symphony and I'm far from a PHP guru so if there's an easier way to do this please let me know.
All you need to do is create a new datasource in Symphony named 'A: Request URI' and then override that code with the following:
You can name the DS whatever you want, you'll just have to change the class name to match. I.e., if you name it 'Banana Man' the first line in the code above should become
Class databanana_man extends Datasource {
. The reason I've called it 'A: Request URI' is so it gets called before all the other datasources and allows me to use the outputted parameters to filter by.I vaguely remember someone mentioning that something similar to this was planned for r6, so it may become unnecessary soon.