X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   .tpl file to add key words to bottom of pages (https://forum.x-cart.com/showthread.php?t=45383)

keystone 02-05-2009 12:38 PM

.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.

JWait 02-05-2009 01:23 PM

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.

keystone 02-05-2009 01:29 PM

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.

Jon 02-05-2009 07:51 PM

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}


keystone 02-06-2009 05:15 AM

Re: .tpl file to add key words to bottom of pages
 
Hi Jon,
Beautiful, that is exactly what I was looking for.
Thanks


All times are GMT -8. The time now is 06:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.