Jump to content

Search the Community

Showing results for tags 'expiry date'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hi. I am using the news system from this tutorial: http://wiki.processwire.com/index.php/Simple_News_System Since the news are just short announcement for one time events, I would like to achieve the following: I want to give the editor a field for setting an expiry date. Expired news should automatically be removed from the main news page, but should be accessible in a folder "older entries". I searched the forum but I didn't find anything similar. Maybe something like this could work, but I don't know how to code this properly: $newsposts = wire("pages")->find("parent=/news-artikel/, $category, template=news, limit=10") (CONDITION)...WHERE EXPIRY DATE FIELD IS NOT EXPIRED What do you think about this approach? Could it work and if so, how is this written properly? Thanks for your help in advance. Thomas PS: Here is the part from my code which fetches the news for the main news page: $newsposts = wire("pages")->find("parent=/news-artikel/, $category, template=news, limit=10"); $out =" "; foreach($newsposts as $newspost){ $out .="<div class='newsitem'>"; $datum1; $datum1 = $newspost->publish; $datum1 = date("d.m.Y - H:i", $datum1); $out .="<a href='{$newspost->url}'><h3>{$newspost->title}</h3></a>"; $out .="<p>{$newspost->summary}</p>"; if($newspost->news_image){ $out .="<a href='{$newspost->url}' class=''>"; $out .="<img class='align_left' src='{$newspost->news_image->size(300)->url}'>"; $out .="</a>"; } $out .="</div>"; } PSS: For the folder "older entries" I guess, I can just use the original code again.
×
×
  • Create New...