Jump to content

$page_name doesn't work proper in blocksearch-top.tpl


Recommended Posts

Hi.

If I print $page_name in header.tpl it works just fine. But if I print the same variable in blocksearch-top.tpl, then It is set only once, and on every page variable looks the same.

 

What I want to achieve ?

<div id="search_block_top" class="col-sm-4 clearfix {if $page_name =='index'}search-index{/if}">

Add class search-index only when home page but It doesn't work. How to resolve this problem ?

 

Someone will say that's normal because "you trying to print variable from .tpl of module". Ok, but the same variable is used in homeslider.tpl and work's fine? I'm frustrated.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...