Jump to content

Need help on how to target a specific category to change its page layout


Recommended Posts

ok I have searched and searched the forums and google and I see several of the same questions a few related but no definite answer.

How to change the layout(html) of the page by category ?
I am sure this is a simple answer.. so if anyone has this answer... PLEASE share !!.

Based on what I have found..Here is what I am doing in my header.tpl that I thought should really work.

{if $page_name|escape:'htmlall':'UTF-8'== 'index'}    
<!-- if page is equal to index do the following-->


 <!-- added a div for my purposes -->

 <!-- moved the center column up for my purposes -->



               {$HOOK_LEFT_COLUMN} <!-- moved the left column into the center column.. -->
    


{elseif $page_name|escape:'htmlall':'UTF-8' == 'category' and $category->id == "5" } 
<!-- ELSE if category page and categroy id = 5 then do the following-->



               {$HOOK_LEFT_COLUMN}


           <!-- Center -->
 <!--this is the class change I added to style this category 5 differently -->

{else} <!-- if not index and not category page then  do the following -->




               {$HOOK_LEFT_COLUMN}


           <!-- Center -->
 <!--  all other pages -->        

{/if} 
Link to comment
Share on other sites

×
×
  • Create New...