Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[SOLVED] Do something when query string is a certain thing
Hi again!
I want to conditionally check whether a second part of query string is in play on a search URL and grab some info from it, for example on:
http://www.textpattern-plugins.local/?q=cache&compatibility=4.7
Basically, I want to capture the 4.7
(or whatever result it is) to a variable and use that in a search results page. The URL may not have that in it, such as:
http://www.textpattern-plugins.local/?q=cache
So I want it to be flexible enough to not blow up if that’s the case.
Any advice/examples?
Offline
Re: [SOLVED] Do something when query string is a certain thing
Have you looked at adi_gps?
Offline
Re: [SOLVED] Do something when query string is a certain thing
Thanks, but I’m looking for a core or pure PHP way, not via a plugin.
Offline
Re: [SOLVED] Do something when query string is a certain thing
<txp:variable name="compatibility"><txp:page_url type="compatibility" /></txp:variable>
Source: Link to last published article
Offline
Re: [SOLVED] Do something when query string is a certain thing
Yay that’s it! Thanks Michael. 👏👏👏
Offline