Jump to content

[SOLVED] Parsing a page URL and comparing it to a variable


Mark H

Recommended Posts

This is probably something simple for someone who knows what they are doing, I'm trying to hack a few extra lines into my IPB forum skin and my skills are very basic at it.

 

The thing that is stumping me is:

 

If I have some code:

 

{parse variable="searchActive" default="" oncondition="IPS_APP_COMPONENT == 'core' AND $this->request['module'] == 'search'" value="active"}

 

 

 

Then that is fine if I'm on that (search) page as the IPS APP component (in the URL) is core and the module is search and thus the value is active but if I goto a page that doesnt have those values in its URL:

 

For example my page url is:

 

http://127.0.0.1/forum/index.php?/page/contact.html

 

 

So I have no IPS App component to work against, so I tried matching against the URL instead like this:

 

 

 

{parse variable="contactusActive" default="" oncondition='{parse url="http://127.0.0.1/forum/index.php?/page/contact.html"}'" value="active"}

 

 

But that doesn't work!? What am I doing wrong? All I want to do is make the value active if I am on that page vs another page.

 

Thanks for your help! I'm sure its a real easy one really!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.