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

display meta_title field on embedded pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-09-2011, 09:33 AM
 
keystone keystone is offline
 

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

Default 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?
__________________
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 03-18-2011, 03:37 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
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 04:55 AM.

   

 
X-Cart forums © 2001-2020