anmihe Posted January 18, 2014 Share Posted January 18, 2014 Hi guys, Trying to ad a login and registrer form in a drop down inside the blocktopmenu.tpl. Everything works fine unless it's an invalid input, then the user get sent to the login page showing the error messages. This would be ok but now I got two login/reg forms on that page. So I want it not to show if the user is on the login page so was gonna use {if $page_name == 'authentication'} to not print the forms as a menu item if on the login page then the login/reg form if the user is anywere else and not logged in. But $page_name returns "authentication" when beeing on the home page when put in the blocktopmenu.tpl ...but return right if on a product or category page ...and returns index when actually on the authentication....and sometimes right depending on from what page I came from. So assuming this is a caching issue? Or? Is there another statement or methtod to use to achive this? Is there a simple way to fix the caching issue? Thanks in advance! /A Link to comment Share on other sites More sharing options...
anmihe Posted January 18, 2014 Author Share Posted January 18, 2014 Posted a bit to fast... If I disable the smarty cache this works just fine, but when turned back on it reutns inxed for the login page and authentication for index. So caching issue for sure. How would I solved this without disabeling the cache? Thanks Link to comment Share on other sites More sharing options...
smooglerpl Posted March 23, 2015 Share Posted March 23, 2015 I have the same problem. I would like to display class only if page == index in blocksearch_top.tpl <div id="search_block_top" class="col-sm-4 clearfix {if $page_name =='index'}search-index{/if}"> How can I resolve this ? Link to comment Share on other sites More sharing options...
Graphics Back Label Posted September 9, 2016 Share Posted September 9, 2016 I have the same problem. I would like to display class only if page == index in blocksearch_top.tpl <div id="search_block_top" class="col-sm-4 clearfix {if $page_name =='index'}search-index{/if}"> How can I resolve this ? You may can try with this : <div id="search_block_top" class="col-sm-4 clearfix {if $page_name eq 'index'}search-index{/if}"> I have replaced the == with a eq for me works great Regards Link to comment Share on other sites More sharing options...
smooglerpl Posted September 9, 2016 Share Posted September 9, 2016 You may can try with this : <div id="search_block_top" class="col-sm-4 clearfix {if $page_name eq 'index'}search-index{/if}"> I have replaced the == with a eq for me works great Regards Thank you! Now, after 18 months of waiting, because of you I was able to solve this problem! Link to comment Share on other sites More sharing options...
Graphics Back Label Posted September 9, 2016 Share Posted September 9, 2016 Thank you! Now, after 18 months of waiting, because of you I was able to solve this problem! Have a lot of topics, and respond all it's a little difficult, I'd want propose to Prestashop to integrate the forum on Stack Exchange, it's more quickly and have more active users Let us know if the solution work for you too Regards, 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