• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Answered Limit Featured Articles

MattRock

New Member
AMS Premium
Is it possible to limit the total number of featured articles? I'm using the featured articles widget on the modular index, and want to make sure the cap on featured articles is 3, so that the widget looks nice, but don't lose visibility to other articles that are presented in a 2nd widget below the featured widget. Does this make sense? I essentially don't want any recent featured articles to drop off the front page as a result of being featured beyond the 3.
 
I'm using the featured articles widget
To clarify, there is no such thing as "THE WIDGET". AMS includes a Widget Definition that allows you to create Featured Article WidgetS < plural with an S, meaning that you can create as many different featured article widgets as you want to, not just limited to a SINGLE Widget.

When creating a new Widget (or editing an existing widget), most Widget Definitions include a LIMIT option (max entries). This option is what controls the MAX displayed content for any given widget.

The first Option in the Featured Articles Widget Definition is "Maximum entries", which is a Core XenForo Phrase that is commonly used in several Core XF, XFRM and XFMG Widget Definitions. This is what controls how many pieces of content (in this case, features articles) will be displayed (the max). With caching and permissions inplay, the definition will overfetch, strip out the unviewable and then slice the result set to the value of this setting.

When you EDIT an existing Widget and make changes to options, it only applies to THAT widget, it won't effect any other widgets created from the same Widget Definition :)

Hope I explained that in a way that helps? (still working on that first cup of coffee)!

Selection_768.png
 
btw, Widgets can't communicate with each other, so Widget X has no idea, what Widget Y is fetching and displaying. A common question that I see is "How can Widget X tell Widget Y to not display something". An example of this is creating a Featured Resources Widget and a Latest Resources Widget and wanting to exclude any resources that are being fetched and displayed in the "Featured resources" Widget, from being fetched and displayed in the "Latest resources" Widget. XF's widget system is not designed to do things like that.

With that said. AMS Latest Articles Widget Definition does have an option to Exclude fetching featured articles, so you can somewhat prevent duplicate content between a Featured Content Widget and a Latest Content Widget. Its more than what you get with Core XF, XFRM and XFMG ;)

AMS Index and AMS Category pages have options to remove any content from the listing pages when that content is being fetched and displayed in the Feature Content blocks. This is possible because its handling in the Controller Action, so it fetches Featured Content first, then passes those ID's into the fetch for the listing. Yet another thing I do that nobody else does. This prevents duplicate content from being displayed on AMS Index and AMS Category pages.

Another option is to develop your own Widget Definitions, hybrids that can do multiple fetches and multiple display outputs. I do these all the time for clients that want unique looking Widgets, like a full width block that consists of Grid Block, Carousel, Grid view and List View all in one that does not include any duplicate content :)
 
I'm not sure this solves my problem, unfortunately.

Essentially what I'm trying to do here is allow my writers to feature articles, but prevent them from dropping off the modular index page if too many are featured. Many wordpress themes have a function called "prevent duplicate display" which will filter out articles marked as "featured" from other widget types, so that you can display however many articles you want in your featured widget, while also preventing them from displaying in other widgets. This is so that when 10 articles are featured, but only 5 are allowed to display, the other 5 will show up in widgets below the featured widget containing just standard articles.

This is hard for me to explain but I hope it makes sense. This is a function that is missing and really preventing me from going live with AMS to replace Wordpress. The risk I face is that articles disappear from the homepage because I'd have to ask my writers to manually keep an eye on featured articles and actively feature/unfeature them. I'm aware of the auto-feature function but that does not solve this problem, unfortunately.
 
I'm not sure this solves my problem, unfortunately.
I never said it did, I was merely explaining in general to anyone reading this thread, how XF Widgets work and explaining a few additional features that ARE available to some of the AMS Widget Definitions.

Many wordpress themes have a function called "prevent duplicate display" which will filter out articles marked as "featured" from other widget types, so that you can display however many articles you want in your featured widget, while also preventing them from displaying in other widgets. This is so that when 10 articles are featured, but only 5 are allowed to display, the other 5 will show up in widgets below the featured widget containing just standard articles.
Widgets can't communicate with each other, so Widget X has no idea, what Widget Y is fetching and displaying. A common question that I see is "How can Widget X tell Widget Y to not display something". An example of this is creating a Featured Resources Widget and a Latest Resources Widget and wanting to exclude any resources that are being fetched and displayed in the "Featured resources" Widget, from being fetched and displayed in the "Latest resources" Widget. XF's widget system is not designed to do things like that.
Matt, as I already explained, the XenForo Widget System does not have any means of communications between widgets like WordPress does. This is a XenForo Widget System limitation, not an AMS limitation. There are existing suggestions posted at XenForo.com in their suggestion forum pertaining to this limitation.

Your only choice to do exactly what you want to do, is to develop your own custom Widget Definition (which is pretty easy to do if you have a basic understanding of PHP and the XF PHP Framework). You can design it to fetch multiple results sets and to display multiple blocks of content with those multiple result sets.

I design and develop custom widget definitions all the time for clients and have developed several of them based on Featured Content where there can be multiple fetch types and multiple displays...

Example of one I recently did for Review Management System...
  • Fetch 3 for display in Grid Block
  • Fetch 6 for display in Tile View (displays immediately after Grid Block). Excludes the 3 fetched for the grid block.
  • Fetch 10 for display in List View (displays immediately after Tile View). Excludes the 3 fetched for the grid block and the 6 fetched for Tile View.
This is a single widget, that displays 3 independent blocks of content using different layout types with no duplicate results.

You can go as WILD as you want when you design and develop your own custom widget definitions.
 
Thanks for this reply - would you be interested in assisting with developing a widget very similar to what you've described for Review Mgmt System?

Also - couldn't it be added to AMS to be made available to all license holders?
 
Back
Top