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

.tpl file to add key words to bottom of pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-05-2009, 12:38 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default .tpl file to add key words to bottom of pages

I would like a little help writing a small code that I can place at the bottom of my bottom.tpl file. My goal is to insert the category/product name into a small paragraph so I can have my keyword near the bottom of my page. Apparently this will help a little with the SEO of the page. The logic I want is this...

If it's the home page (which I think is this code {if $main eq "catalog" and $current_category.category eq ""} ) then <p>blah blah blah</p> {else} {if the page is a category page} <p> blah blah {insert category name} blah blah</p> {else} {if the page is a product page} <p> blah blah {insert product name} blah blah</p>

can anyone give me a hand with this?

I don't know where to look up the correct "terms" for different pages or I would try and do it myself. For example I don't know how to say if a category page and not the home page or product page. Things like that.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 02-05-2009, 01:23 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: .tpl file to add key words to bottom of pages

Why not just add {include file="location.tpl"} to bottom.tpl?? This will add the navigation breadcrumb trail (including the category) to the bottom of the page.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 02-05-2009, 01:29 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: .tpl file to add key words to bottom of pages

I want to put an actual paragraph in with some meaningful text in it. I guess that your suggestion could work for now until I get a little help coding what I want. Thanks for that idea.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #4  
Old 02-05-2009, 07:51 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: .tpl file to add key words to bottom of pages

Code:
{if $main eq "catalog" and $current_category.category eq ""} Home Page Text {elseif $main eq "catalog" AND $current_category.category ne ""} Category is {$current_category.category} {elseif $main eq "product" and $product.product} Product is: {$product.product} {/if}
Reply With Quote
  #5  
Old 02-06-2009, 05:15 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: .tpl file to add key words to bottom of pages

Hi Jon,
Beautiful, that is exactly what I was looking for.
Thanks
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
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 06:09 AM.

   

 
X-Cart forums © 2001-2020