e107
e107 copied to clipboard
news category template - layout type field - template list is not correct + FIX
Bug Description
News category field template is using type "layout" and it is getting all keys from related template. It is ok and everything works like it should (in admin area)
The problem is that core news template contains related news template, so it is listed then, but you can't use it for category list (there are different shortcodes).

Expected Behavior
Listed only templates within $NEWS_INFO
$NEWS_INFO = array(
'default' => array('title' => LAN_DEFAULT, 'description' => 'unused'),
'list' => array('title' => LAN_LIST, 'description' => 'unused'),
'2-column' => array('title' => "2 Column (experimental)", 'description' => 'unused'), //@todo more default listing options.
);
Like in News Prefs

Alternative
Move related template to separate file.
See https://github.com/e107inc/e107/issues/2952
@CaMer0n it is something different. That field work correctly. Only related template should be moved from news template to news view template so this key is not listed for news view.
Or I can't see example when you choose here related templated for list of news.