Copied to clipboard

Flag this post as spam?

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


  • Lucas 13 posts 37 karma points
    Dec 06, 2011 @ 12:09
    Lucas
    0

    Edit template, moving name property to custom tab

     

    Hi all,

    I've created custom tab and I would like to _move_ "Name" property from built-in "Properties" tab to my own tab.

    How can I customise existing "Properties" type for my own Document Type?

    How can I add existing built-in property to my custom tab?

     

    Any help appreciated :)

    Regards

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 06, 2011 @ 13:57
    Tom Fulton
    1

    Hi Lucas,

    There isn't really a built-in way to move the Name field, however you can use the Jesper Easy Values package to add a field that "synchs" with the Name to any custom tab.  Just add a textfield called umbName, then when you create a new document it will be pre-populated with the page name, and changing it will also change the name.  It's got some other goodies as well.

    Hope this helps,
    Tom

  • Lucas 13 posts 37 karma points
    Dec 06, 2011 @ 18:06
    Lucas
    0

    Thanks Tom for your quick response.

    Jasper's package looks interesting but it's not really what I'm looking for but still ... quite close, good idea with using sync.

    Tom, is there really no way of changing default properties for my document type? It's quite interesting in fact as let's for example take 2 different content types : "File" and "Content Page". They are displaying different Properties when you edit an item... but that's probably because they are calling different pages "editContent" and "editMedia". I'm interested where Umbraco stores list of properties to render/allow edit? Is it "hardcoded" in editContent and editMedia? 

    I didn't manage to find any config setting or database entry that stores list of properties per content type. It would be really cool and I feel there must be a way to create new content type that has only properties defined by the user or to modify existing content type by removing properties that are not needed.

    Any ideas such as DB modification, handling ApplicationBase events or anything else are greatly appreciated.

    Regards,

    Lucas

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 06, 2011 @ 18:44
    Tom Fulton
    0

    Hi Lucas,

    You are right, the default "properties" on the Properties tab aren't really properties at all, they are hardcoded onto the page.  They are different for Media & Content nodes.

    I'm a little unsure of what your goal is, but I'm sure you could use ApplicationBase to remove some of these.  I've actually used it once to hide the Unpublish button on the Properties tab, by injecting some jQuery onto the page.  I could share the code if you like.

    Is your goal to hide some of these properties?  Or just to have your own set of default properties (you can do this with Master Doc Types)?  I'm not really sure why you'd want to remove some of them, maybe you can explain though..

    -Tom

  • Lucas 13 posts 37 karma points
    Dec 07, 2011 @ 08:42
    Lucas
    0

    Hi Tom,

    My Goals:

    * Custom section with custom tree displaying & allowing creation of "Events" pages (this has to be managed from custom section as central place and not from "Content" section). 

    * For every Event page you can create (using custom create dialog) child-page called "translation" where you can pick language and override some of the "parent event" properties.

    * Event page when edited should display following properties "Name, Publish date, URL, Country, Language, Type, Body HTML"

    * Event translation page when edited should display following properties "Name, Publish date, Country (read-only), Language, Type (read-only) and Body HTML"

     

    I have everything done apart displaying of the properties that I need. I think your initial suggestion about putting property on different tab and using the sync package is the closest to what I can get. I’m still not sure whether it will be approved as it's slightly different from requirements...

     

    Thanks for all your help Tom,

    Regards,

    Lucas

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 07, 2011 @ 14:35
    Tom Fulton
    0

    Hi Lucas,

    I see.  So all the properties are displaying now but you just want to clean them up, ie only show on one tab, remove the uneeded ones like 'Remove At' and 'Template' etc?  Of course you could use your own tab and duplicate some of the properties there using custom datatypes (for Name, URL, etc).

    If you want to hide some of the built in properties you could inject some jQuery with ApplicationBase.

    And...here's one other thing I just remembered.  Check out the uHidesy package which will allow you to hide the built in properties that you don't want showing - that might be exactly what you need :)  Check out the screencast

    -Tom

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 07, 2011 @ 14:35
    Tom Fulton
    0

    hiccup..double post :)

Please Sign in or register to post replies

Write your reply to:

Draft