Jump to content

[SOLVED] Changing the Product_list center Grid without effecting homepage


Recommended Posts

Hello everyone,

 

I have a question that has relevance to the product_list:

 

- I'm using the default theme of prestashop.

- Using version of 1.5.4.1

 

I followed a great tutorial of Nemo1 (Link) and everything went well. :rolleyes:

I don't have interest to remove the Left / Right columns, just using the Grid style instead of default List.

 

The main page of store structure (still in development progress) - Link

 

The Category page structure (Product_List.tpl) - Link

 

As you can see, I don't use the Left / Right columns in the category page, but I do use them in different locations in the store.

 

Is it possible to change the width of center grid to 980px  (full width of the store)? example in attached photo.

 

Please note, It is possible to do so via header.tpl, but this will effect all the columns in the store.

 

Perhaps CSS?  :huh:

 

Thanks in Advanced!

post-316405-0-58254400-1378546553_thumb.png

Edited by vekia (see edit history)
Link to comment
Share on other sites

you need to increase width of the center column in header.tpl file, i don't know what you changed exactly, but you can define width for homepage only with simple if conditions

 

 

what you have to change is class param for center column, you need to use grid_9 for homepage, this is condition for it:

 

{if $page_name=="index"}

grid_9

{else}

grid_5

{/if}

Link to comment
Share on other sites

I believe what you wrote is the solution, I need your look in the current code:
 
header.tpl
<div id="columns" class="grid_9 alpha omega clearfix">
<!-- Left -->
<div id="left_column" class="column grid_2 alpha">
{$HOOK_LEFT_COLUMN}
</div>

<!-- Center -->
<div id="center_column" class=" grid_5 alpha">

{/if}

footer.tpl

<!-- Right -->
<div id="right_column" class="column grid_2 omega">
{$HOOK_RIGHT_COLUMN}
</div>

because I only need this in the category page, your code should be like:

{if $page_name=="category"}
grid_9
{else}
grid_5
{/if}
How should I put it in the code? 
I tried it and it messed up the main page pretty well  :(
Link to comment
Share on other sites

Code after modification.

<div id="columns" class="grid_9 alpha omega clearfix">
<!-- Left -->
<div id="left_column" class="column grid_2 alpha">
{$HOOK_LEFT_COLUMN}
</div>


<!-- Center -->
<div id="center_column" class="{if $page_name=='category'}grid_9 omega{else}grid_5 alpha{/if}">
{/if}

Now its working!

 

Vekia, once again you saved my day!  :D

 

very appreciate your help and patience!

Link to comment
Share on other sites

×
×
  • Create New...