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)
-   -   display meta_title field on embedded pages (https://forum.x-cart.com/showthread.php?t=58398)

keystone 03-09-2011 09:33 AM

display meta_title field on embedded pages
 
I currently have a "custom title mod" set up in my customer/home.tpl like this

Code:

{* Custom Title Tag Start *}
{if $main eq "catalog" and $current_category.category eq ""}
Scented Candles Wholesale Candles Unscented Candles Wedding Candles Holders
{section name=position loop=$location step=-1}
{math equation="x-1" x=$smarty.section.position.total assign="secondlast"}
{if $smarty.section.position.iteration ne $smarty.section.position.total}{$location[position].0|escape}{/if}
{if $smarty.section.position.iteration ne $secondlast}{if not %position.last%}  {/if} {/if}
{/section}
{elseif $main eq "help"}
{$lng.txt_subtitle_help}
{elseif $main eq "cart"}
{$lng.txt_subtitle_cart}
{elseif $main eq "checkout"}
{$lng.txt_subtitle_checkout}
{elseif $main eq "order_message"}
{$lng.txt_subtitle_thankyou}
{elseif $main eq "wishlist"}
{$lng.txt_subtitle_wishlist}
{elseif $main eq "giftcert"}
{$lng.txt_subtitle_giftcerts}
{elseif $main eq "pages"}

{$page_data.title} - Wholesale Candles Wedding Favors Reed Diffusers

{else}
{section name=position loop=$location step=-1}{$location[position].0|escape}{if not %position.last%} - {/if}{/section}{/if}

{* Custom Title Tag End *}


I have added a new field in the database table xcart_pages called meta_title. I want to change this part
Code:

{elseif $main eq "pages"}

{$page_data.title} - Wholesale Candles Wedding Favors Reed Diffusers


to look more like

Code:

{elseif $main eq "pages"}

{$page_data.meta_title}


so it will display the info from the meta_title field. I'm not sure what php file I need to update so that the meta_title variable will be defined and displayed. Can anyone help with that?

qualiteam 03-18-2011 03:37 AM

Re: display meta_title field on embedded pages
 
The {$page_data} is defined in "<xcart_dir>/pages.php" script.

If you've added the "meta_title" field to the "xcart_pages" table.
It should appear in {$page_data} automatically and can be accessed via {$page_data.meta_title} Smarty variable.


All times are GMT -8. The time now is 05:45 PM.

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