More in this section
Forums / Developing with Sitefinity / Extending the DynamicContent Designer widget with new properties

Extending the DynamicContent Designer widget with new properties

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
8 posts, 0 answered
  1. lee
    lee avatar
    0 posts
    Registered:
    20 Apr 2016
    17 Nov 2017
    Link to this post

    Greetings,

    I've created a Dynamic Module, similar to Blogs, called CompanyNews.  I'd like to extend the designer widget to include a new field called "Content Box Title", which would be used in the ListView template.

    I've found some older examples, but nothing that is more recent that 2012.  

    How can I achieve this in version 10.2?  Specifically looking for MVC examples.

    TIA!

    -Lee

  2. lee
    lee avatar
    0 posts
    Registered:
    20 Apr 2016
    17 Nov 2017
    Link to this post

    Oh. One of the examples I found is at Example Found Here.  But it talks about modifying the Toolbox.config, which my project does not appear to have.

    -Lee

  3. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    17 Nov 2017 in reply to lee
    Link to this post
    Have you reviewed this documentation? https://docs.sitefinity.com/feather-extend-default-widget-designer 
  4. lee
    lee avatar
    0 posts
    Registered:
    20 Apr 2016
    20 Nov 2017 in reply to Jonathan
    Link to this post

    Hi Jonathan,

    Yes, I did come across that article, but the DynamicContent type seems to be a bit more...Dynamic. :) I can't find the related designer view at all in my project.  I did find it on GitHub, but it seems that I would have to override the controller for ALL dynamic content in order to achieve this.  Seems a bit extreme.

     

    I just want to be able to set some text for an instance of a widget on a page, and then pick up that text in the widget template and use it. In this case it will be used as the title for the HTML portlet that will contain the actual dynamic content.  If there's another way to achieve this I'm open to that as well.

    Thanks,

    Lee

  5. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    21 Nov 2017 in reply to lee
    Link to this post
    Can you use a custom widget? What functions beside setting a 'Title' do you need on the widget level?
  6. lee
    lee avatar
    0 posts
    Registered:
    20 Apr 2016
    21 Nov 2017
    Link to this post

    Hi Jonathan.  I probably could use a custom widget, but I would be recreating the functionality of the default DynamicContent designer widget.  I'm hoping for a low level of effort for something that seems like a fairly trivial ask. 

    I've even contemplated repurposing the MetaTitle property in the designer widget, but haven't really investigated how to pick up it's value programmatically and what unexpected impact it might have.

  7. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    21 Nov 2017 in reply to lee
    Link to this post

    The MetaTitle Property is used for mapping a custom 'Field/Property' to display in detail view for OG meta tags. So setting it to 'Year' would display the year as the OG meta title in detail view, probably not what you want to do.

    Would the user putting a content block right above the widget work for your content needs? What would be the benefit of controlling it in the widget?

    I am not saying it's not possible to trying to understand the need.

  8. lee
    lee avatar
    0 posts
    Registered:
    20 Apr 2016
    21 Nov 2017 in reply to Jonathan
    Link to this post
    Take a look at the Portlets in this Bootstrap theme.

    Metronic Admin 3

    My goal is to have a list of my DynamicContent items be displayed inside one of these portlets.  The benefit of making the Title property configurable would be that I might want to display "Company News" on one page, "IT News" on another page, and "Human Capital News" on another.  They're drawing from the same DynamicContent type, just filtering by the parent item. 

    I also considering just getting the parent item of the first detail item in the list and displaying it's Title value, however in some cases the list will be made up of items from multiple types, so that paradigm won't always work.

8 posts, 0 answered