Featured Resources page

Posted by Community Admin on 04-Aug-2018 05:14

Featured Resources page

All Replies

Posted by Community Admin on 02-Jun-2015 00:00

I'm looking to create a page like the Sitefinity Resources page: www.sitefinity.com/resources

Where featured blog posts, videos, events and case studies will be aggregated. I'm fairly new to Sitefinity so would like to know what's the best way in going about achieving this?

My first thought is to tag the featured content and somehow pull them into one page.

Posted by Community Admin on 02-Jun-2015 00:00

Hi Vincent,

I would do it like this:

  1. Create a Dynamic Module (Module Builder) with the appropriate fields e.g. Title, Summary, Image, PageUrl etc.
  2. Also add a Taxonomy Field (Categories or Tags)

 

I think with this approach you can build your resource page as on the Sitefinity.com website without a problem.

Best regards,
Daniel

Posted by Community Admin on 03-Jun-2015 00:00

Hi Daniel,

Thanks for the reply!

I've followed your steps and it seems to work okay however, is it possible to have a single widget pull tagged content from a variety of content types? Because surely I shouldn't have to create single content type that serves a blog post, a video, a news article, just to get them to display together in one widget.

Or do you think that the Sitefinity.com resource page is actually static and not pulling content based on category/tag?

Posted by Community Admin on 04-Jun-2015 00:00

Hi Vincent,

I think it is possible to create a widget that pulls from different content types. You should be able to do this through the API and the Sitefinity Managers.

But that could be a lot of work if you also want to have some influence on what you want to show, meaning you'll have to create a quite advanced designer for your widget.

The dynamic module could exists of several related data fields for news items, blogposts etc. So this way you can create items for you resource page and link to the needed content.

Of course, you will end up in 'duplicate' content, since these items will be dynamic content items, but I think you will have the most control over it, this way.

Let me know what you think?

Best,
Daniel

Posted by Community Admin on 04-Jun-2015 00:00

I would make a new "Tag" called "Featured" and use it across all content types...

 The use the API managers to query each type I want to appear there.  Convert the resulting objects to a COMMON proxy class....like

public class FeaturedProxy

   public string Title get;set;​
   public string ​Summary get;set;​
   public string ​ImageUrl get;set;​
   public string Url get;set;​
   public string SortIndex get;set;​
   public string ContentType get;set;​
   public ​DateTime ​PublicationDate get;set;​



...so just convert each of your types to like a collection of this object

Then just make a custom MVC widget to loop through and display the results, maybe sorted by SortIndex or whatever priority you define for the items

This thread is closed