Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Apr 18, 2013 @ 20:37
    Garrett Fisher
    0

    Adding a Description to the Page Name Field

    In the UI, how can I add a description to the NAME field on the Peroperties tab (i.e.: the lighter-colored smaller text underneath the field name)?  I want to put a little warning there that the URL will be changed if the value is changed.

    Thanks in advance,

    Garrett

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Apr 18, 2013 @ 22:16
    Markus Johansson
    1

    I'm not sure if this is the best way but if you create a custom data type and add that to this document type. In this datatype you could inject some javascript do add your text.

    There is probably a less "hacky" way to do this....

  • gary 385 posts 916 karma points
    Apr 19, 2013 @ 21:14
    gary
    0

    Hi Garrett

    Where you add your property to the docType, there is a field called Description, under Validation, drop your comment in there and it will appear underneath the name tag for the field when viewed in the Content Area,

    Hope that helps

    Gary

  • Garrett Fisher 341 posts 496 karma points
    Apr 23, 2013 @ 23:20
    Garrett Fisher
    0

    Hi Gary -- I think you missed my point, unfortunately.  I am talking about the Name field which appears on the Poperties tab -- although this is exposed in the CMS, it does not appear in the field list in the docType -- lest someone remove an unquestionably required field.  And since EVERY document type has the Name field, I'd prefer to bang this out once globally.  Ideas?  Besides the javascript idea, which I will do if I get no other replies?

    Thanks again,

    Garrett

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 24, 2013 @ 01:07
    Tom Fulton
    1

    Javascript or some C# code that ties to the umbracoPage.Load event will probably be your only options as this is hardcoded in the edit page.

    One other idea is to look into the jesperEasyValues package.  It allows you to place a field on your document as a normal property, but it synchs with the Name field on save.  So you control the name from this field instead of the Properties tab, and of course since its a normal property you can add a description to it.

    -Tom

  • Garrett Fisher 341 posts 496 karma points
    Apr 24, 2013 @ 16:48
    Garrett Fisher
    0

    I'm totally cool with doing it using javascript, I just can't figure out where to put it!  Do you have any tips on how exactly to tie into the umbracoPage.Load event?  Where is that puppy firing/initialized?

    Thanks again,

    Garrett

  • gary 385 posts 916 karma points
    Apr 24, 2013 @ 21:41
    gary
    0

    Hi Garrett

    If you want a global aspect, maybe you could add it to the form for the docType creation?

    Have a look at Umbraco>Controls>ContentTypeControlNew.ascx, this would appear to be where the name field is generated, could your description be added to this?

    But then again I have been known to get completely the wrong end of the stick before!

    Best regards and apologies

    Gary

  • Garrett Fisher 341 posts 496 karma points
    Apr 25, 2013 @ 19:09
    Garrett Fisher
    0

    Making changes in this file doesn't appear to change anything.  Does this need to be compiled in some way?  Tom, where does the umbracoPage.Load occur?

    Thanks,

    Garrett

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 26, 2013 @ 08:07
    Tom Fulton
    1

    Hi Garrett,

    If you want an easy way to add some JS to the page, check out BackOffice Power Scripts, makes it super-simple with a .config file.  If you want to do it via C#, take a look at the source for DocTypeFieldsets, which adds some controls to a page via the Init event (see InjectEditorControls.cs).

    -Tom

  • Garrett Fisher 341 posts 496 karma points
    Apr 26, 2013 @ 19:16
    Garrett Fisher
    0

    These are both excellent options -- thank you for getting back to me Tom.

    //Garrett

Please Sign in or register to post replies

Write your reply to:

Draft