Hey everyone, looking for some technical guidance here. I am needing to expire some News posts (News is a custom module) after 2 months. I don’t want to use the Release/Expiry Date to run this, as I need these posts to still live on the main News Page (so I can’t have them expire).
I know how to expire things well for simple modules using SearchScope, but trying to figure out how to make this work if it is past 2 months that the article has been active.
Here is the scenario:
Client has 3 news posts that are featured on the home page. Sorted by release date (descending).
When a post date is past 2 months (let’s say 60 days) from the release date, it disappears
If all 3 news posts are expired, then the whole section disappears.
I’m sure I can figure all of this out on my own, and will more than likely run all of this using a FORLOOP so I have a bit more control on page (especially for the actual section they are sitting in.
I guess my question is, I will be using “now” in my search scope, i.e. prop_ReleaseDate_Min to set the minimum date, but I am trying to introduce a variable where it also checks 60 days out and doesn’t show it if it exceed the 60 days.
So, totally worked Adam! Thanks so much. Here’s another one. Any way to ‘offset’ the first item using searchScope, or within the module tag? I know I can offset the first item using a FORLOOP, but I want to be able to have it offset from the module tag rather a loop.
Reason, I have the most recent article separate from this, further up the page, so I don’t want it to duplicate in the bottom news articles.
This is working well on the home page. But I need to output all Blog Items on the Blog Main Page, except for the articles that are not within 60 days, while still including a limit and pagination. Any suggestions @Adam.Wilson ?