e107 icon indicating copy to clipboard operation
e107 copied to clipboard

news category template - layout type field - template list is not correct + FIX

Open Jimmi08 opened this issue 3 years ago • 2 comments

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).

image

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

image

Alternative

Move related template to separate file.

Jimmi08 avatar Oct 03 '22 09:10 Jimmi08

See https://github.com/e107inc/e107/issues/2952

CaMer0n avatar Sep 28 '23 17:09 CaMer0n

@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.

Jimmi08 avatar Sep 28 '23 17:09 Jimmi08