+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Extend properties of Content Block

Extend properties of Content Block

2 posts, 0 answered
  1. Ricardo
    Ricardo avatar
    29 posts
    Registered:
    06 Nov 2012
    23 Jul 2013
    Link to this post
    Hello everyone,

    I would expect this to be a simple one, but have been struggling, so hopefully you can help.

    I am trying to extend the existing content block widget. I essentially want to add a name (before it is shared, as when shared it allows for that) and also a text field for it. I wonder how can I achieve that.

    If need be, I can use the module builder to define all of this, but not sure how to define the template to match with that and to make it behave the same way with the edit, delete and permissions content menu as well. So I think it should be easier just to extend the current one. Any suggestions and code examples and much appreciated.

    Kind Regards,

    Ricardo

  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    31 Jul 2013 in reply to Ricardo
    Link to this post
    are you wanting to extend the Content Block module with a custom field? out of the box, Content Blocks are not dynamic types, so you have to use the API to add the field, then manually add the fields to the input. There is a summary of how you can do this in this thread:  http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/custom-fields---content-blocks

    It seems like more trouble than it is worth however. Unless you need such extreme granular control over shared content, I think it might be best to create a custom module, then add it as to a page template so that it is reusable there, and any page that uses that template will have that content on it.

    I hope this is helpful, please let me know if I misunderstood the question or if I can be of any further help!
2 posts, 0 answered