maddmac Posted May 31, 2020 Posted May 31, 2020 What's the best way to exclude the current page from results without resorting to filtering the results in a FOR LOOP. $news = $pages->find("template=news-article,sort=-publish_date, publish_date<$today"); In this example If I want to exclude the current page how would I do that? Is there a sibling reference?
kongondo Posted May 31, 2020 Posted May 31, 2020 24 minutes ago, maddmac said: In this example If I want to exclude the current page how would I do that? $news = $pages->find("template=news-article,sort=-publish_date, publish_date<$today,id!={$page->id}"); PS: if publish_date is a datetime field, then ProcessWire already knows 'today' (string) ?. 3
Recommended Posts