7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Need help with price field
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 519 Views |
-
Need help with price field

26 September 2010 at 5:12am
I have added price in my dataobject. but i need to add function: if price bigger than 50000 then it shows other link than normally.
Can someone help me with that. The price is textfield not currency. -
Re: Need help with price field

26 September 2010 at 5:19am
public function BigPrice() {
return $this->Price > 50000;
}---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com -
Re: Need help with price field

26 September 2010 at 5:21am Last edited: 26 September 2010 5:22am
And then the link in theme i use:
<% if BigPrice %>
show content over 50000
<% else %>
less than 50000
<% end_if %>true of false
-
Re: Need help with price field

26 September 2010 at 6:02am
Yup!
---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com
| 519 Views | ||
|
Page:
1
|
Go to Top |

