Hello, I am trying to setup a simple module that displays a short message on article pages (the current article) in which the article is greater than a 1 year old.
{article}{if created >= date('-1 year')}The related files have now been archived.{/if}{/article}
Still trying to figure out how to display nothing if it is not over a year old.
However when I browse to the page, it just keeps loading and loading until it times out and I get a timeout error.
I am assigning the module to the menu item of the articles (Article Blog). On the article blog page that shows the intros of 10 articles, I do not want the module to show, but only on the actual page of the single article (to which there is no menu item), and only if it is over a year old.
When I go to the single article page of an article over 1 year old, it loads ok, however on the Article blog view (with 10 article intros showing) it just loads and loads and ultimately the page fails to open.
I recommend you only assign the module to the articles, not the blog view.
You can do that with Advanced Module Manager.
regularlabs.com/advancedmodulemanager
With the pro version of Advanced Module Manager you could even assign the module to some custom PHP code that could check the age of the article. That way you wouldn't even need Articles Anywhere for this.