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

Simple template mod advice needed

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-18-2012, 01:46 AM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Smile Simple template mod advice needed

Hello
I searched on this subject but haven't found any relevant info so I'll ask.

I want to add a separate dialogue box at the top of each page identical to the box you get on subcategories.
As you know when you add a description to a subcat it produces a box so long as you have entered a description-no description=no box so I guess this is the else/if routine in action.
I modified the template on subcats to do exactly what I want like this

{/if}
{capture name=dialog}
{*<h1>{$current_category.category|amp}</h1>*}
{/capture}
{if $config.Appearance.subcategories_per_row eq 'Y'}

{if $current_category.description ne ""}

{capture name=dialog}
<h1>{$current_category.category|amp}</h1> <div class="subcategory-descr">{$current_category.description|amp}</div>

{/capture}
{include file="customer/dialog_blank.tpl" title="sub cats" content=$smarty.capture.dialog}

{/if}

By moving the H1 header into the box and editing out the original position.

I don't understand how the capture/smarty stuff works so would like some advice on the code I can cut n paste into each template to produce the box with relevant H1 page title inserted automatically

Regards

Paul H
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
Reply With Quote
  #2  
Old 03-18-2012, 08:28 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Simple template mod advice needed

http://www.smarty.net/docs/en/language.function.capture.tpl
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 03-19-2012, 01:45 AM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Default Re: Simple template mod advice needed

Thanks CFL
I figured that all the code has to be within div tags before using the capture routine although It has somehow managed to put all page labelling within the main box rather than a separate dialog box which actually looks better and cleaner
Cheers
Paul
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
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 02:20 AM.

   

 
X-Cart forums © 2001-2020