Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorFlancer
    • CommentTimeOct 20th 2007
     
    I am trying to implement a is_discounted field in the booklinks tutorial. I got it to show a checkbox but when displaying the value, it only shows a 1 or 0. Is there an automatic way to get Akelos to show it as True or False?
    •  
      CommentAuthorbermi
    • CommentTimeOct 20th 2007
     

    Akelos get('is_discounted') will return true or false boolean which is printed by PHP like

    echo true; // 1
    echo false; //      <--- nothing here
    

    You could simply do this in your view

    echo $book->get('is_discounted') ? 'true' : 'false';
    
    • CommentAuthorFlancer
    • CommentTimeOct 20th 2007
     
    Thanks Bermi.
Add your comments
    Username Password
  • Format comments as