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)
-   -   Showing location where u are! (https://forum.x-cart.com/showthread.php?t=13687)

Owl 04-28-2005 01:12 PM

Showing location where u are!
 
I have a lil problem, I want to show on a big <h1> head line where people are, for instance if they are in a category, it will show <h1>Categoryname</h1> and if in a product <h1>Productname<h1> and so on and so on.... for manufacturers also and all the sites :)
I tried looking into the location.tpl list for the last url there but i couldn't solve it! :/ I think this is already built in within x-cart but im not sure.

{$product.productcode} ? prehaps and all other things like that.. i dunno =)

balinor 04-28-2005 02:17 PM

You are correct, you need to play around with location.tpl.

Owl 04-28-2005 11:22 PM

Yah
 
Yah, I know :) but hmm i wounder where from the variable $title is coming from, so i can steer what should be in the title and use that variable :)

mikebo 04-29-2005 03:17 AM

Hi Owl,

You can try this,

Code:

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


I'm not sure if its exactly what you want, but your welcome to try it.

mikebo 04-29-2005 03:19 AM

With the H1 tag it would look like this.

Code:

{strip}
{section name=position loop=$location}
{if %position.last%}<H1>{$location[position].0|escape}</H1>
{else}
{/if}
{/section}
{/strip}


Owl 04-29-2005 03:37 AM

Yah that would do it, thanks =)

sstillwell@aerostich.com 04-29-2005 08:04 AM

Sure would be nice if Xcart would release a kind of API for a lot of the big variables that are passed from PHP to Smarty.

like the location, I think it's an array, but how is it organized. I'm sure we could hack it, but it would be nice if they just gave a little description what is in there. Subcategories are another.

Maybe we could start a thread that explains these variables?

jb5ep 04-29-2005 10:28 AM

Quote:

Sure would be nice if Xcart would release a kind of API for a lot of the big variables that are passed from PHP to Smarty.

I'm hearin' that.... although surely that would make life too easy and mean less custom-mod revenue for XC?!

Cynical, i know.... :D But i'm likely to commission a mod with XC, as I can't work out how to re-use the product_links variable that's assigned to Smarty. An API wouldn't be the be-all and end-all of problems like this, but IMHO, it would certainly make things a bit easier....


All times are GMT -8. The time now is 11:00 PM.

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