Forums / Developer / item.text
Luc Chase
Monday 26 January 2004 9:37:56 am
Is the text property of the basket item editable? I want to rename the basket such that when the item.text value is displayed (such as in a navigation menu) it does not say 'basket' but something else such as "Enquiry". Where is that value stored?
The Web Application Service Provider
Eirik Alfstad Johansen
Tuesday 27 January 2004 1:23:31 am
Hi Victor,
Are you refering to the name of the basket, or the names of the items in the basket? Also, where exactly does the name that you want changed appear (module and view)?
Sincerely,
Eirik Johansen
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Tuesday 27 January 2004 7:10:01 am
I don't mean the contents of the basket but the word 'Basket'. For example in a bread-crumbs style menu (such as the one used on this site) the value {$Path:item.text} returns the name of the current item and when the current item is the Basket it will say 'Basket'. I don't want it to say 'Basket', so I want to know where item.text is defined for the basket object. I notice that for example in the standard design there is a form template called 'register' yet $Path:item.text returns a value of 'Enter account information'. So, it is not necessarily the same as the page or object name but I can't find exactly where it is stored and how to change it.
Tuesday 27 January 2004 7:31:28 am
The label "Basket" which appears as part of the bread crumbs bar, is defined in the basket view code of the shop module. Open kernel/shop/basket.php and scroll to the very bottom of the document where you find the following code:
$Result['path'] = array( array( 'url' => false, 'text' => ezi18n( 'kernel/shop', 'Basket' ) ) );
PS. Keep in mind that altering the kernel will make your distribution uncompatible with future versions. You might be better of doing some kind of template override, depending on where in your template code your bread crumbs bar is located.
Tuesday 27 January 2004 7:42:14 am
Thanks! Exactly what I wanted... it worked. Not sure yet how to use an override for this but when I have more time (hopefully before my next upgrade) I'll try to implement it that way. Thanks again.