View Single Post
  #1   IP: 180.125.59.21
Old 2014-03-24, 09:51 PM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default Show static pages on certain conditions

Let's say add a block at left bar, show some static pages on certain conditions.

step one, creat a file called categories_guide.tpl, place it under skin/common_files/customer, and paste the following code in the page:

Code:
{*
df14bc9e9dec4a3332552facb2c31eaaf22d39a2, v5 (xcart_4_4_2), 2010-12-17 15:12:37, categories.tpl, aim
vim: set ts=2 sw=2 sts=2 et:
*}
{capture name=menu}
  <ul>
   {foreach from=$pages_menu item=p}
      {if $p.orderby < 170 and $p.orderby >59}
        <li><a href="pages.php?pageid={$p.pageid}">{$p.title|amp}</a></li>
      {/if}
    {/foreach}
  </ul>
  {assign var="additional_class" value="menu-categories-list"}
{/capture}
{include file="customer/menu_dialog.tpl" title="Glasses Guide" content=$smarty.capture.menu}
or:
Code:
{*
df14bc9e9dec4a3332552facb2c31eaaf22d39a2, v5 (xcart_4_4_2), 2010-12-17 15:12:37, categories.tpl, aim
vim: set ts=2 sw=2 sts=2 et:
*}
{capture name=menu}
 {section name=pg loop=$pages_menu}
 {if $pages_menu[pg].orderby < 170 and $pages_menu[pg].orderby >59 }
  <a href="pages.php?pageid={$pages_menu[pg].pageid}" class="VertMenuItems">{$pages_menu[pg].title}</a><br />
{/if}
{/section}
{assign var="additional_class" value="menu-categories-list"}
{/capture}
{include file="customer/menu_dialog.tpl" title="Shopping Guide" content=$smarty.capture.menu}
step two, edit left_bar.tpl under skin/2-columns/customer, find:

Code:
{if $active_modules.Refine_Filters}
  {include file="modules/Refine_Filters/customer_filter.tpl"}
{/if}
above it add:
Code:
{include file="customer/categories_guide.tpl"}
Reply With Quote