Beluga Posted March 15, 2014 Share Posted March 15, 2014 (edited) I'm using responsive top bar from Simple responsive theme and I'm trying to conditionally add an element inside the top bar (responsivetopbar.tpl). This element should display only, when the customer is viewing the product list. Responsive top bar already does a Smarty assign 'products' => $products, so I can't use that. Edited March 15, 2014 by Beluga (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 you can do it with if conditions: {if $page_name=='category'} do something {/if} or {if $smarty.get.id_category} do something {/if} 1 Link to comment Share on other sites More sharing options...
Beluga Posted March 15, 2014 Author Share Posted March 15, 2014 Thanks, vekia, works great! Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 you're welcome at the end of this topic, i just want to say that first method {if $page_name=='category'} {/if} its much better. Wondering why? in some casese second error can spawn undefined index notification. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now