Hello all,
We are using MediaWiki to house an internal knowledge base, when an application/customer is retired from our system we move all the data we have accumulated from one Namespace to another that is not searched be default. The issue arises when a application is only partially retired and the Category (read [[Category:Blah Blah IIS]]) contains both retired and none retired pages, is it possible to prevent the "retired" namespace from showing up in this Category? We are using templates for the automagic filling out of some information and one of them being the application/customer name so simply removing the Category string is not a option :(
I am open for ideas and thanks in advance for your time.
I'm not sure how to hide the namespace, but you can ignore the namespace is the sorting of the category with either {{DEFUALTSORT:{{PAGENAME}}}} for all categories it is in or [[Category:Blah Blah IIS|{{PAGENAME}}]] for just that category.
On 2/14/2012 4:37 PM, Zach H. wrote:
Hello all,
We are using MediaWiki to house an internal knowledge base, when an application/customer is retired from our system we move all the data we have accumulated from one Namespace to another that is not searched be default. The issue arises when a application is only partially retired and the Category (read [[Category:Blah Blah IIS]]) contains both retired and none retired pages, is it possible to prevent the "retired" namespace from showing up in this Category? We are using templates for the automagic filling out of some information and one of them being the application/customer name so simply removing the Category string is not a option :(
I am open for ideas and thanks in advance for your time. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
You have to use an extension. Category tree allows hiding of namespace prefixes. There is another one too call hidenamespace or something like that.
Tom Sent from my iPhone
On Feb 14, 2012, at 4:48 PM, Gerald Grenier roguebfl@cfl.rr.com wrote:
I'm not sure how to hide the namespace, but you can ignore the namespace is the sorting of the category with either {{DEFUALTSORT:{{PAGENAME}}}} for all categories it is in or [[Category:Blah Blah IIS|{{PAGENAME}}]] for just that category.
On 2/14/2012 4:37 PM, Zach H. wrote:
Hello all,
We are using MediaWiki to house an internal knowledge base, when an application/customer is retired from our system we move all the data we have accumulated from one Namespace to another that is not searched be default. The issue arises when a application is only partially retired and the Category (read [[Category:Blah Blah IIS]]) contains both retired and none retired pages, is it possible to prevent the "retired" namespace from showing up in this Category? We are using templates for the automagic filling out of some information and one of them being the application/customer name so simply removing the Category string is not a option :(
I am open for ideas and thanks in advance for your time. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hurm, I guess I maybe did not explain well, if article/page lives inside of the "STAR" namespace id like it to just not show any page with that, my other thought would be some how to make the template smart and know that if the title/pagename contains "^STAR:" to not add it to the category
I know perl so my best explanation would be
if($title =~ /^STAR:/i) { Do_no_add_to_cat; } else { Add_to_cat; }
is this something that ParserFunctions http://www.mediawiki.org/wiki/Extension:ParserFunctionscan do?
On Tue, Feb 14, 2012 at 4:42 PM, Tom tom@hutch4.us wrote:
You have to use an extension. Category tree allows hiding of namespace prefixes. There is another one too call hidenamespace or something like that.
Tom Sent from my iPhone
On Feb 14, 2012, at 4:48 PM, Gerald Grenier roguebfl@cfl.rr.com wrote:
I'm not sure how to hide the namespace, but you can ignore the namespace
is the sorting of the category with either
{{DEFUALTSORT:{{PAGENAME}}}} for all categories it is in or
[[Category:Blah Blah IIS|{{PAGENAME}}]] for just that category.
On 2/14/2012 4:37 PM, Zach H. wrote:
Hello all,
We are using MediaWiki to house an internal knowledge base, when an application/customer is retired from our system we move all the data we have accumulated from one Namespace to another that is not searched be default. The issue arises when a application is only partially retired
and
the Category (read [[Category:Blah Blah IIS]]) contains both retired and none retired pages, is it possible to prevent the "retired" namespace
from
showing up in this Category? We are using templates for the automagic filling out of some information and one of them being the application/customer name so simply removing the Category string is not
a
option :(
I am open for ideas and thanks in advance for your time. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hurm, I guess I maybe did not explain well, if article/page lives inside of the "STAR" namespace id like it to just not show any page with that, my other thought would be some how to make the template smart and know that if the title/pagename contains "^STAR:" to not add it to the category
I know perl so my best explanation would be
if($title =~ /^STAR:/i) { Do_no_add_to_cat; } else { Add_to_cat; }
is this something that ParserFunctions http://www.mediawiki.org/wiki/Extension:ParserFunctionscan do? Oops, sorry about the first answer. Yes, parserfunctions extension can handle it. Combined with a {{NAMESPACE}} magic word.
It would look like this.
{{#ifeq:{{NAMESPACE}}|STAR|[[Category:This Category]]|[[Category:That Category]]}}
This tells the parser, if Namespace is STAR, then This category, not equal, That Category
For your example you would have to use a double pipe.
{{#ifeq:{{NAMESPACE}}|STAR||[[Category:That Category]]}}
This tells the parser, if Namespace is STAR, then nothing(there is nothing between the two || characters), not equal, That category.
Tom
Tom,
You are the man! Thanks for your assistance :) It works as prescribed and all is happy and well in my MediaWiki.
Thanks again for being apart of an awesome community that is always willing to help
On Tue, Feb 14, 2012 at 9:21 PM, Tom Hutchison tom@hutch4.us wrote:
Hurm, I guess I maybe did not explain well, if article/page lives inside of the "STAR" namespace id like it to just not show any page with that, my other thought would be some how to make the template smart and know that if the title/pagename contains "^STAR:" to not add it to the category
I know perl so my best explanation would be
if($title =~ /^STAR:/i) { Do_no_add_to_cat; } else { Add_to_cat; }
is this something that ParserFunctions http://www.mediawiki.org/wiki/Extension:ParserFunctionscan do? Oops, sorry about the first answer. Yes, parserfunctions extension can handle it. Combined with a {{NAMESPACE}} magic word.
It would look like this.
{{#ifeq:{{NAMESPACE}}|STAR|[[Category:This Category]]|[[Category:That Category]]}}
This tells the parser, if Namespace is STAR, then This category, not equal, That Category
For your example you would have to use a double pipe.
{{#ifeq:{{NAMESPACE}}|STAR||[[Category:That Category]]}}
This tells the parser, if Namespace is STAR, then nothing(there is nothing between the two || characters), not equal, That category.
Tom _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Though though unless you wand all the pages in NAMESPACE STAR to be sorted under S you will still want
{{#ifeq:{{NAMESPACE}}|STAR||[[Category:That Category|{{PAGENAME}}]]}} so that is will be sorted based on the pagename not the name space in the category list.
On 2/14/2012 11:26 PM, Zach H. wrote:
Tom,
You are the man! Thanks for your assistance :) It works as prescribed and all is happy and well in my MediaWiki.
Thanks again for being apart of an awesome community that is always willing to help
On Tue, Feb 14, 2012 at 9:21 PM, Tom Hutchisontom@hutch4.us wrote:
Hurm, I guess I maybe did not explain well, if article/page lives inside of the "STAR" namespace id like it to just not show any page with that, my other thought would be some how to make the template smart and know that if the title/pagename contains "^STAR:" to not add it to the category
I know perl so my best explanation would be
if($title =~ /^STAR:/i) { Do_no_add_to_cat; } else { Add_to_cat; }
is this something that ParserFunctions http://www.mediawiki.org/wiki/Extension:ParserFunctionscan do? Oops, sorry about the first answer. Yes, parserfunctions extension can handle it. Combined with a {{NAMESPACE}} magic word.
It would look like this.
{{#ifeq:{{NAMESPACE}}|STAR|[[Category:This Category]]|[[Category:That Category]]}}
This tells the parser, if Namespace is STAR, then This category, not equal, That Category
For your example you would have to use a double pipe.
{{#ifeq:{{NAMESPACE}}|STAR||[[Category:That Category]]}}
This tells the parser, if Namespace is STAR, then nothing(there is nothing between the two || characters), not equal, That category.
Tom _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org