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

Forums / Developing with Sitefinity / Custom Module for Content Input

Custom Module for Content Input

10 posts, 0 answered
  1. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    07 Apr 2010
    Link to this post
    I am looking for a suggestion on how best to do this. Our client will be inputing content as in the attached image. This content is now just stored in a content module. To create a new issue, they can duplicate it and then edit as appropriate (cover imaage, issue date, artilce listing). However there is CSS applied to the content to get the desired look leaving room for error assuming they can't look at the HTML.

    In the image - the titles link out to PDF's. For each article entry, I could have a title (may or may not be linked), author (optional), and description.

    I think it may be best to build a control (like the one here [is this still good for 3.7?] http://www.sitefinitywatch.com/blog/09-02-20/Making_Control_Editing_User-Friendly_with_Sitefinity_Control_Designers.aspx and just have the fields Title, Author, description, and link or something like that?  How heavy wwould it make the page to have to drag that control on to it for each entry?

    i thought about a list control of sorts as well...

    Do you have any reccomendations?

    Thank you very much.
  2. David van Geel
    David van Geel avatar
    59 posts
    Registered:
    19 Aug 2009
    08 Apr 2010
    Link to this post
    Hi Laura,

    It depends mostly -I think- on the number of items on the page. If you have some items on a page then using a user control for each item should suffice. At some point I would switch to using a module for the items. When using a module you have one user control on a page to display all the items. And you get additional functionality like pagina, sorting, etc.

    Basically I would use seperate user controls for up to 10 items on a page. If the customer wanted more items on a page I would start using a module. Note that this is not a "hard" decision it has more to do with what you think will happen in the future. Looking at your image you could use the News module for these items. We sometimes use the news module for more than one type of information ("real" news items and press releases for example) and use categories to seperate the items on display.

    Hope this helps.

    Regards,

    David 
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Apr 2010
    Link to this post
    Hi David van Geel,

    You should better use one of the built-ion modules - NewsView, Generic_Content, create a custom provider for a module or create a new module. Then you can list the items by using ContentView based control bound to your items datasource? Using a control for each entry is very bad way.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  4. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    08 Apr 2010
    Link to this post

    David,

     

    Thank you for your thoughts and suggetions.  I think a Module is the way to go.
     
    Thank you Ivan, I am sure I will have some questions along the way.... you guys are great.
    Thanks.

  5. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    08 Apr 2010
    Link to this post
    Would a custom module  (I am using the Products Module example) be the way to go, but also incorporating the Lists control?  So each issue would include a List of articles?    
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Apr 2010
    Link to this post
    Hi Laura,

    Stucture of List could not be used directly if you use Products module, because each IListItem has parent which is INamedList - some kind of hierarchical structure. You could

    • extend Products module and implement an additional interface the will act as Parent ( as it is done for Blogs and Images and Documents module)
    or

    • create metakeys of type LongText  that you will use to enter your articles - the Product name will be the the Issue, and the metakeys ( some text, links etc) will act as list of articles.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    09 Apr 2010
    Link to this post
    Thanks Ivan.

    I think the way to go is extend Products module and implement an additional interface the will act as Parent ( as it is done for Blogs and Images and Documents module)

    The thing I love about Sitefinity is that you can create some pretty robust stuff and customization without havning an indepth knowledge of C# or .net.   The last time I really programmed was VB6 and have not formally learned .NET so while I understand the concept, I do a lot of copy and pasting.

    With that said, it would be nice to create a "Product" such as a magaziine issue with certain metakeys (which seems pretty straigh forward).  Then be the Parent like you said of a list of articles with their own meta keys such as title, url if linked to a PDF, author, and abstract.

    is there something you can direct me to to extend the Products module (if that is what I should use to begin with) to incorporate the Parent interface?  I did look at the blogs and Images and Documents in the dev manual.

    Thank you very much.
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Apr 2010
    Link to this post
    Hello Laura,

    You need to create interface that defines the fields every Parent object needs to provide. Then you have to create interface that defines a behaviour that any Parent provider needs to implement - GetParet, SaveParent, DeleteParent etc. In the ProductsManager you need to implement the logic to persist your data, because the default module - Products that inherits from Generic Content will not be able to do this. You have to create a custom data layer as well.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    12 Apr 2010
    Link to this post
    Sorry for my development stupidity, but instead of doing all that, could I extend maybe the Lists module to create a list that would look like this?  This is the ultimate goal as well as have it easy for the user to just input the data and not have to worry about the styling. And to have varying number of articles listed on the page per magazine issue.

    Article Title (can be a link to a PDF or not linked at all)
    Author
    Description

    What would be the best and easiest solution? Something like the news module would get confusing because I assume that each article would have to be listed as a single item creating a hugely long list and there are many different magazines as well.

    Thanks again,
  10. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    12 Apr 2010
    Link to this post
    Hello Laura,

    The advantage of creating a generic content based module is that you would easily make use of functionality such as meta fields, sorting, filtering, categories and tags. This will help you when you build your content view controls to display the items - you will be  able to easily implement filtering, sorting, etc. It will also make it easier for you to implement search provider and RSS provider.

    The only advantage of a list like module would be that you can set the order in which items appear - their ordinal. However all other functionality should be developed from scratch.

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
10 posts, 0 answered