wubugs Posted January 14, 2011 Share Posted January 14, 2011 sorry i am brand new to all this. let me try to be clear.i have a menu at the top of my site like with any retail site: Home, Cart, Account, Products, contact. (products used to say sitemap until i changed it) When you click the "products" tab it directs you to a sitemap.php file. however i want the file contents of categories.tpl to appear instead when you click "products." Is there a way I can make this work?here is the categories.tpl code: {include file=$tpl_dir./breadcrumb.tpl} {include file=$tpl_dir./errors.tpl}{if $category->id AND $category->active} {$category->name|escape:'htmlall':'UTF-8'}{$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} {if $scenes} <!-- Scenes --> {include file=$tpl_dir./scenes.tpl scenes=$scenes} {else} <!-- Category image --> {if $category->id_image}getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} {/if} {if $category->description}{$category->description} {/if} {if isset($subcategories)} <!-- Subcategories --> {l s='Subcategories'} {foreach from=$subcategories item=subcategory} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image}getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} {/if} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} {/foreach} {/if} {if $products} {include file=$tpl_dir./product-sort.tpl} {include file=$tpl_dir./product-list.tpl products=$products} {include file=$tpl_dir./pagination.tpl} {elseif !isset($subcategories)}{l s='There is no product in this category.'} {/if}{elseif $category->id}{l s='This category is currently unavailable.'} {/if}and here is the sitemap.php<?phpinclude(dirname(__FILE__).'/config/config.inc.php');include(dirname(__FILE__).'/header.php');include(dirname(__FILE__).'/product-sort.php');$nbProducts = intval(Product::getNewProducts(intval($cookie->id_lang), isset($p) ? intval($p) - 1 : NULL, isset($n) ? intval($n) : NULL, true));include(dirname(__FILE__).'/pagination.php');$smarty->assign(array( 'products' => Product::getNewProducts(intval($cookie->id_lang), intval($p) - 1, intval($n), false, $orderBy, $orderWay), 'nbProducts' => intval($nbProducts)));$smarty->display(_PS_THEME_DIR_.'new-products.tpl');include(dirname(__FILE__).'/footer.php');?> [1]: http://i.imgur.com/0GCZq.jpg Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now