0 users online. Create an account or sign in to join them.Users
This is an open discussion with 6 replies, filed under General.
I am wondering (lonely as a cloud) why both of these params have the same content?
I would have thought that the current-path param was the physical path, without the querystring, yet it has the querystring, which I would only expect on the current-url param.
Is this a bug I've found?
I thought current-url contains the full URL, including protocol and hostname, whereas current-path is relative to the site root.
That is how it works for me.
Sorry, that's right, but I still wouldn't expect a querystring to be in a path parameter, as technically it isn't a path.
But I'll shut up if everyone else is ok with it ;o)
designermonkey, i was thinking the same way. I am not sure how often people need path with query string, but in my case it would be much more useful to have a path without query string. Or maybe there could be both: current-path (without query string) and current-query containing just a query string?
I just ran into an issue with this while constructing the URL for pagination on a page with both a Page param (…/foo/) and an (optional) pagination url-param (?page=1).
I could use something like concat($root, $parent-path, '/', $current-page, '/', $foo, '/?page=$') in the pagination-url param but it's a hassle.
concat($root, $parent-path, '/', $current-page, '/', $foo, '/?page=$')
Much better would be if I could just use concat($current-path, '?page=$') but I can't because $current-path will contain the previous ?page url-param. So on page 2 I'd get …/page/foo/?page=1?page=2 etc.
So +1 for $current-path without the url-params.
You can always get rid of the query string with substring-before('?', $current-path), if I remember well the params :)
But I agree as well that current-path shouldn't contain the query string.
Create an account or sign in to comment.
Contact the team
Symphony • Open Source XSLT CMS