zemiacsik

How looks $PageTemplate? It is a function which returns something renderWith or just a news page object? Maybe the scope is broken..

wmk

Then in your item you could make a check for it like

  1. public function isCurrentPagesCategory() { return $this->CategoryInput === Controller::curr()->TopLevelTitle; }
wmk

you want to see if the category of a specific news item equals the current Page's Title?

wmk

"loop through one page" doesn't make sense. If it's only one item and no list, <% with %> is your friend.

James

I loop through 1 news page, and then loop through all articles aka children of news page

James

$PageTemplate is the news page, which then I loop to get all the articles