BACKLOG REQUEST - Custom Module: Component Tag Enabled Only Option

Currently, we have two Custom Module Component tags available to us: “List of Items” and
“List of member’s items” as shown in the screenshot.
Treeple componet tag options

What I propose is a “List of enabled items.” This list differs from the “List of items” as it does not look at the release date or expiration date. This component tag will only work if a user is logged into a secure zone. So as long as the module item is enabled, it will be visible.

I would think it would be just a module change: "type: “module_of_member” is for List of Member’s Items, so maybe "type: “module_enabled_items” could work for this.

Why would I need this? There are quite a few times where I have had to create custom start and end dates so that I can control what is displayed where. For example, I have a client we created a news module that they edit from a secure zone on the front end. They want to set a release date at times. A custom start date allows them to see it in their front-end portal but not display it on the site. With my proposed change, I wouldn’t have to add custom dates.

Another client has a list of sponsors with end dates. Again in their front-end portal, they want to see the sponsors that have ended so they can renew.

I might be missing the idea here, but since the system only outputs ‘enabled’ items anyway, wouldn’t you actually need a way of rendering items that are ‘disabled’ as well in these cases?

I would see it as a component parameter like ignoreDisabled:

{% component source: "My Module", ignoreDisabled: "true", type: "module" %}

This could then be used with regular module output or member only output.
So very similar to the current ignoreWeighting parameter.

By default, ignoreDisabled would be false (current behaviour) and when set to true it shows all module items disabled or otherwise.

Perhaps even extend this a little deeper to distinguish between the different types of ‘disabled’ items, ie:

ignoreExpired
ignoreDisabled

Thoughts? or have I misunderstood?

I like your idea.

I actually want just enabled items, but it filters out items by release date and expiry date. I don’t want it to filter the dates. I just want everything that is enabled. The option to have disabled only might be useful in some cases. I just see disabled items as items I absolutely don’t want for one reason or another.

Enabled, Disabled, Expired, and Release are all different “parameters” if you will. There are times when I would like to ignore the release date only and other times when I would like to ignore just the expiry date. Being able to set that as a parameter might be the solution.

Right, so you want to output items that are inactive (due to release/expiry dates):

image

So the parameter could look like:

{% component source: "My Module", ignoreInactive: "true", type: "module" %}
  • false being the default (current behaviour - doesn’t output inactive items)
  • true outputs inactive items with active items

ignoreInactive: "true|false"

From there you can use liquid to determine if an item is pre-release date or post-expiry date.
But I guess the parameter could be pushed further to include additional values like:

  • pending outputs pre-release date items with active items
  • expired outputs post-expiry date items with active items

ignoreInactive: "true|false|pending|expired"

The true|false option is probably sufficient, but just putting the idea out there :slight_smile:

That looks good, yes even just to have a simple “ignoreInactive” true|false would be good. This would save a lot of time.

@Rhatch - Should I use @Adam.Wilson’s last post as the description for the public backlog or do you write something up? :slight_smile:

@Peter-Schmidt You can use Adams.

1 Like

@Rhatch - Here it is - Let me know if you need me to add or edit anything :slight_smile:

Thanks @Peter-Schmidt
Should we remove the ‘Custom Module’ reference from the title (as this should apply to any module)?
And I think it would be worth including the request for the similar parameter to ignore ‘disabled’ items too.

So perhaps changing the title to:

Component Tag Parameter: Ignore Inactive/Disabled items

And add to the end of the description:

Similarly, a parameter to ignore ‘disabled’ items:

ignoreDisabled: "true|false"

1 Like

Thanks @Adam.Wilson - Updated :slight_smile: