Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Make Static Page a Category Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-13-2007, 07:21 PM
 
sjbt sjbt is offline
 

Advanced Member
  
Join Date: Jun 2007
Posts: 35
 

Default Make Static Page a Category Page

First question - doesn't // comment out smarty tags? I'm having trouble hiding lines.

More importantly, I have a custom app that I'm leading into with a static page. This page should be a category page though.

I tried to just put the link into category.tpl. However, it is not styled like the rest of the categories. Is there a better way to do this? I haven't come up with anything by searching.

In Categories.tpl - I added the third line down.

{if $config.General.root_categories eq "Y"}
<div class="categories">
<a href="pages.php?pageid=9">My New Category Page</a><br/>
{foreach from=$categories item=c}
<a href="home.php?cat={$c.categoryid}">&raquo;&nbsp;{ $c.category}</a>
{/foreach}
</div>
{else}
<div class="categories">
{foreach from=$subcategories item=c key=catid}
<a href="home.php?cat={$catid}">{$c.category}</a>
{/foreach}
</div>
{/if}
__________________
X-Cart 4.1.8
Reply With Quote
  #2  
Old 09-14-2007, 04:47 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Make Static Page a Category Page

First, be sure to read the template editing guide to learn about commenting things out and what templates are what.

Category pages and static pages are two different things, so they can't be one and the same, so I'm not sure what you mean by a static page being a category page?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 09-14-2007, 06:09 AM
 
sjbt sjbt is offline
 

Advanced Member
  
Join Date: Jun 2007
Posts: 35
 

Default Re: Make Static Page a Category Page

I wanted to redirect a category page to a static page. The static page represents a "doorway" to a certain class of products.

I got it to work this way.

I made a category page and then edited categories.tpl within the {foreach} loop to add an {if} statement to look for the X-Cart Category and substitute my page.


{if $c.category eq "TheCategoryName"}
<a href="pages.php?pageid=9">&raquo;&nbsp;TheCategory Name</a>
{else}
go on with the loop.


Thanks for answering my dumb questions.
__________________
X-Cart 4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:56 PM.

   

 
X-Cart forums © 2001-2020