Cannot use variables

Jump to: navigation, search

I want to use this in a template

<DynamicPageList>
namespace = {{NAMESPACE}}
redirect = none
</DynamicPageList>

But it doesn't work, nor as passed parameter. It doesn't even work on pages directly:

<DynamicPageList>
namespace = {{NAMESPACE}}
ordermethod = popularity
order = descending
redirect = none
</DynamicPageList>

The (main) namepsace is used instead. Bug? (MW 1.18 here)

Subfader16:04, 14 December 2011

I've not tested, but you could try to use #tag:dynamicpagelist as in wikibooks:Template:CategoryList

{{#tag:dynamicpagelist|
namespace = {{NAMESPACE}}
ordermethod = popularity
order = descending
redirect = none
}}
Helder16:24, 14 December 2011

Yep. Cheers!

Subfader17:16, 14 December 2011

Yep, #tag:dynamicpagelist is the required solution. Variables are only interpreted in some parameters, of which namespace is not one. It does main namespace since it considers anything that's not a namespace name to be the main namespace (so people can use things like 'main' ).

Cheers.

Bawolff06:11, 15 December 2011
 
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox