contao / news-bundle

[READ-ONLY] Contao News Bundle
GNU Lesser General Public License v3.0
9 stars 14 forks source link

Show the reader if an item has been selected #44

Closed michb closed 6 years ago

michb commented 6 years ago

Please add the handling for the ModuleNewsReader into the ModuleNewsList, just like the ModuleEventList handles the request for ModuleEventReader.

Both listing modules ModuleNewsList and ModuleEventList do the same steps in the generate methode

  1. show backend information
  2. sortOutProtected
  3. return '' if there are no archives left
  4. call parent generate function

But the ModuleEventList also does this between step 3 and 4 https://github.com/contao/calendar-bundle/blob/f18b9130ba4d02ef0c189ed5fb16ef8d2922c8ec/src/Resources/contao/modules/ModuleEventlist.php#L75-L79

// Show the event reader if an item has been selected
if ($this->cal_readerModule > 0  && (isset($_GET['events']) || (\Config::get('useAutoItem') && isset($_GET['auto_item']))))
{
    return $this->getFrontendModule($this->cal_readerModule, $this->strColumn);
}

I see no reason why the ModuleNewsReader cannot also this step. In my opinion this would improve consistency and makes it easier to great nice URLs.

fritzmg commented 6 years ago

Duplicate of #39