Page 1 of 1

Making {titleattribute} field into price field

Posted: Fri Feb 19, 2010 6:43 pm
by fgrace
Hi

I am a newbie to CMSMS

I would really appreciate some help on this issue. I wish to make the {titleattribute} input field a price field.

So if the price of say 500.00 is entered into this field, my template would show up the following "Prices from € 500.00"

I created a new Menu Template called Price with this code:
{foreach from=$nodelist item=node}
{if $node->current == true}
Prices from: €{$node->titleattribute}
{else}
{/if}
{/foreach}

It shows correct when I call the template when prices have been entered, but where prices are empty it still displays the text: "Prices from: €"
any help would be appreciated, I can't seem to find an answer in this forum or support notes.
- FG :)

Re: Making {titleattribute} field into price field

Posted: Tue Feb 23, 2010 10:49 am
by fgrace
Hi guys

any help on this issue?
best regards
FG  :)

Re: Making {titleattribute} field into price field

Posted: Wed Feb 24, 2010 6:20 pm
by fgrace
I tried it a different way:

{if $node->titleattribute != ''}{string="Prices from:€}{$node->titleattribute}{else}{/if}

still no joy, would really appreciate some help :)

Re: Making {titleattribute} field into price field

Posted: Thu Feb 25, 2010 4:31 am
by davidkirk451
You almost had it.  This works:

{if $node->titleattribute != ''}Prices from:€{$node->titleattribute}{else}{/if}

Re: Making {titleattribute} field into price field

Posted: Tue Mar 09, 2010 7:47 pm
by fgrace
Hi David

Sorry for delay in replying,  I tried the code you sent again (and tried different modifications)  and still cannot get the price to show in the layout..I'm getting desperate now :)
any further help would be appreciated

Re: Making {titleattribute} field into price field

Posted: Tue Mar 16, 2010 11:06 pm
by Dr.CSS
Have you looked in Menu Manager help for any extra parameters you may need to add to the menu tag call like maybe loadprops?...