I have a created a page in CMSMS and I would like to get information from the URL for example
I have a page at https://www.website.com/page
I have noiced if I do something like https://www.website.com/page?#44faa6d7 is still go the page. That all good.
I want to get the ?#44faa6d7 part or url and add it to a variable so I can use it in a template.
What is the best way of doing this.
Thank you and happy new year
Geting url data Topic is solved
Re: Geting url data
It's hard to tell if you're trying to get a url parameter or an anchor, as your example seems to be a mix of both. For a url parameter (?foo=bar) you can use {$smarty.get.foo}
If you're trying to get the anchor (#foo) then you'll probably need to use javascript as that information isn't sent to the server.
url parameters can't contain '#', that's reserved for anchors.
If you're trying to get the anchor (#foo) then you'll probably need to use javascript as that information isn't sent to the server.
url parameters can't contain '#', that's reserved for anchors.
Not getting the answer you need? CMSMS support options
-
- Forum Members
- Posts: 155
- Joined: Thu Aug 20, 2020 10:49 pm
Re: Geting url data
Thank you very much, That worked,