Copied to clipboard

Flag this post as spam?

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


  • Richard 38 posts 78 karma points
    Feb 15, 2010 @ 18:29
    Richard
    0

    Generic Properties (e.g. "Hide in navigation") setting default values?

    Hi,

    I'm using a variant of the Runway FAQ module, and want my faqQestions to default to "Hide in navigation = true".

    Currently, the Generic Property "Hide in navigation" (alias: umbracoNaviHide, Type: True/false) is defined in faqQuestion Document Type. This is fine, but it always defaults to false or not checked. Is there any way to turn this around? Hide in navigaition shoud be my default, with the option to switch.

    Thanks!

    R

     

  • dandrayne 1138 posts 2262 karma points
    Feb 15, 2010 @ 18:36
    dandrayne
    3

    Perhaps something like this would work for you? http://our.umbraco.org/projects/default-values-for-umbraco

    Also, you can of course just reverse the condition in xslt, so that it umbracoNaviHide=0 then hide the page, check to unhide.  Then just change the label from "hide from navigation?" to "show in navigation"

    Dan

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Feb 15, 2010 @ 18:38
    Nik Wahlberg
    4

    Your best bet is to reverse the logic in your output and the label of the document property. So, instead call it Show in navigation? and in your XSLT you would say:

    <xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) = '1']">

    Cheers,
    Nik

  • bob baty-barr 1180 posts 1294 karma points MVP
    Feb 15, 2010 @ 22:20
    bob baty-barr
    0

    so, question answered here by two community members in less than 10 minutes time...

    i gave both of them a thumbs up... i hope the original poster comes back to give one of them the solution as it is a very helpful one for all.

  • Richard 38 posts 78 karma points
    Feb 16, 2010 @ 21:48
    Richard
    0

    impressive :-) Thanks!

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 17, 2010 @ 17:50
    Morten Christensen
    0

    I would recommend you try out this package ;)

    http://our.umbraco.org/projects/standard-values-in-umbraco

    On the project page you'll find a short screencast, which shows you how you can add default/standard values on your document types.

    - Morten

  • Jayesh 7 posts 27 karma points
    May 14, 2012 @ 12:18
    Jayesh
    0

    Hello Everyone, 

     

    I am a new bee in umbraco and i developing a site with multilingual structure. i had added the hide in navigation [ umbracoNaviHide ] and works fine but as i have also implemented relation to other languages i want to related this property also.

     

    structure of site is :-

     --English

    -----section

    -------section contents1 [ Hide in navigation is appiled.]    <----------------|  Both are related.

    -------section contents2                                                                   |

    --German                                                                                      |

    -----section                                                                                    |

    -------section contents1   <------------------------------------------------------------- |

    -------section contents2

    etc.

    what my question is how can i find the document ID of the related document and then i can set the property as i wannted.

     

     

    Thanks in Advance.

Please Sign in or register to post replies

Write your reply to:

Draft