Template talk:New feature/item: Difference between revisions
(read me) |
mNo edit summary |
||
Line 11: | Line 11: | ||
to MediaWiki configuration file (LocalSettings.php) | to MediaWiki configuration file (LocalSettings.php) | ||
Why we should care about that? If we got proper categories filled with function pages we can make pages like [[Changes_in_1.5]] automatically listing new added functions in future. It's possible but also require new changes ( | Why we should care about that? If we got proper categories filled with function pages we can make pages like [[Changes_in_1.5]] automatically listing new added functions in future. It's possible but also require new changes (for ex. this: https://www.mediawiki.org/wiki/Extension:DynamicPageList_(Wikimedia) ). | ||
--[[User:Lopez|Lopez]] ([[User talk:Lopez|talk]]) 15:46, 10 July 2015 (UTC) | --[[User:Lopez|Lopez]] ([[User talk:Lopez|talk]]) 15:46, 10 July 2015 (UTC) |
Latest revision as of 15:49, 10 July 2015
There is problem with these templates (Template:New feature/item and Template:New items). Currently Template:New feature/item should be used only on function pages, not in functions list like Template:GUI functions but many people don't care about that. In result we have broken categories - look - Client_Scripting_Functions shouldn't be in any category like Category:Changes in 1.3.1.
My first idea was just replace Template:New feature/item in template functions lists to Template:New items but this can be done simplest way, we just can use only one universal template. Function lists just start from * so we can check it in template, like that:
{{#ifeq:{{#sub:{{{4}}}|0|1}}|*||[[Category:Changes in {{{2}}}]]}}
So template add category only to function pages which start from normal description without *. But there is problem - ParserFunction extension has locked string functions so we can't use sub. This can be enabled by adding
$wgPFEnableStringFunctions = true;
to MediaWiki configuration file (LocalSettings.php)
Why we should care about that? If we got proper categories filled with function pages we can make pages like Changes_in_1.5 automatically listing new added functions in future. It's possible but also require new changes (for ex. this: https://www.mediawiki.org/wiki/Extension:DynamicPageList_(Wikimedia) ).