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)
-   -   Location of $title (https://forum.x-cart.com/showthread.php?t=39112)

luxor 04-15-2008 06:01 PM

Location of $title
 
While working with dialog.tpl, I notice there is {$title} which is loading the current category name on top of my category pages. Now I'm trying to manipulate this and not show a $title if its a certain category , but can not find the code that actually defines the $title on the php and smarty side.

kube 04-15-2008 06:19 PM

Re: Location of $title
 
Hi Luxor,

There are a few ways as to how a title can be formed, in x-cart it is commonly done through an {include}

Take skin1/customer/main/subcategories.tpl for an example, near the bottom of the code you'll find...

{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra='width="100%"'}

Above, the title variable has been created with a value of $current_category.category (Or, in other words, a newly created title variable has now been populated with the current category).

And also note, $content is passed from a {capture} too

Try pasting this somewhere for a quick example...
{include file="dialog.tpl" title="I'm a title" content="nice!" extra='width="100%"'}


Hope this helps.

luxor 04-15-2008 09:34 PM

Re: Location of $title
 
yup got it thanks


All times are GMT -8. The time now is 11:29 AM.

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