网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   X-Cart (https://www.0058.net/forumdisplay.php?f=70)
-   -   Show static pages on certain conditions (https://www.0058.net/showthread.php?t=4675)

topvip 2014-03-24 09:51 PM

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"}


All times are GMT +8. The time now is 03:44 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.