![]() |
Check for url paramater existance
Hello ..
Wondering if there is a way in smarty to find out if a certain parameter exists in the url's query string? e.g: current url - product.php?productid=16137&cat=0&page=1&featured and I need to check if the parameter 'featured' exists ... {if $php_url.query_string eq "featured"} ... {/if} doesn't seem to work, because that outputs the whole query string ... Can anyone help ? Thanks Shafiq :sK |
Re: Check for url paramater existance
Try...
Code:
{if $php_url.query_string eq "productid=`$product.productid`&cat=0&page=1&featured"} |
Re: Check for url paramater existance
Thats Great ... Thanks Phil ..
Regards Shafiq :sK |
Re: Check for url paramater existance
IS there a way to read just part of the query string? Like an instring function of some sort? I need to look for "mode=checkout" within the query string, but there may be more parameters then that.
Any help is appreciated. -dpm |
Re: Check for url paramater existance
Code:
{if $mode eq "checkout"} ... {/if} |
Re: Check for url paramater existance
Hi Phil...
Thanks for your quick response... I should have been a little more clear... I have 2 options: 1. cart.php?mode=checkout 2. cart.php?mode=checkout&signup=1 If the signup=1 is present then I show the user a hidden div tag where they can signup for a membership. I tried this but it didnt work. {if $signup eq "1"} ... {/if} Any ideas? Many Thanks, -dpm |
All times are GMT -8. The time now is 07:27 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.