Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sascha 4 posts 24 karma points
    Aug 05, 2012 @ 00:39
    Sascha
    0

    Conditional :)

    Hy Umbraco Friends :)

    Short Intro:

    Im totaly new to Umbraco (after 3 Attempts last night) i gettin Umbraco workin :).

    Im also through Master Template, and Inheriting it :).

     

    What i try to do with Umbraco ? Making my Homepage "easier" for changes.

    www.team-redline.at (is fully handcoded), so any change to it would be a work of a few days :) now i want to help myself a little bit out :).

     

    MY QUESTION

    I´ve created some Propertys in a Tab for a Document Type. So the funny part is, how can i make a condition "If the properties" are filled, put it into the html output, else dont show this "for example div container, image" etc..


    ´@Gebrüder Weiss we are working with Open Text (REDDOT) - its a pain, but it has conditional Tags. Is this possible to do in a simply and reusable way in Umbraco ?

     

    Big thanks to all of you, and hopefully, i understand fast what im doin, so i can start to develop some great runway modules :)


    Nice greets from Austria

     

    Sasa

  • Richard Brookes 34 posts 57 karma points
    Aug 05, 2012 @ 10:25
    Richard Brookes
    0

    Hi Sasa,

    When you drop a page value (property) onto a template you have some formating options such as a fallback value (perhaps another property or just a literal value). Also the option to put some markup before or after the value. But if you want to use conditional logic you are likely going to need to create a macro to handle this.

    Depending on your preference you would create a macro based on either XSLT or Razor. So you can simply use conditional logic such as if statements to test for a particular value or lack of one and put whatever html markup is appropriate in there.

    I hope this helps a little

  • Sascha 4 posts 24 karma points
    Aug 05, 2012 @ 13:27
    Sascha
    0

    Thanks for the reply Richard :)

    I´ve seen some macros and how i can access properties :).

     

    Workin arround with it but big thanks for leading me to the way :) !

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies