Hello,
Newbie here. I'm developing a project and have my main focus on content and user interface. I am trying to decide what would be the best way to direct my tech guy to get the following working:
I want specific words and graphics to be displayed in a templated box if a page belongs to a specific category (if the page does not belong to this category, a default text/graphic should be displayed).
I've looked into the description of the DPL extension (which we probably will be going to use anyway) and wonder if that is the easiest/best way to take. Or is there some other simple built-in way to make the Mediawiki software do this (we run 1.12) which I just haven't come across yet?
kassoe
--- (please excuse if this turns out to be a duplicate - I could not see my first attempt being posted on the list)
I don't think this is possible with a vanilla install; someone else on the list can probably say with more certainty.
Either way, sounds like Semantic MediaWiki might be a good fit for you. (and it can do what you're asking for) Take a look at http:// semantic-mediawiki.org/wiki/Help:Inline_queries
--Jeremy
On Aug 14, 2008, at 3:58 AM, Bjorn Kassoe Andersen wrote:
Hello,
Newbie here. I'm developing a project and have my main focus on content and user interface. I am trying to decide what would be the best way to direct my tech guy to get the following working:
I want specific words and graphics to be displayed in a templated box if a page belongs to a specific category (if the page does not belong to this category, a default text/graphic should be displayed).
I've looked into the description of the DPL extension (which we probably will be going to use anyway) and wonder if that is the easiest/best way to take. Or is there some other simple built-in way to make the Mediawiki software do this (we run 1.12) which I just haven't come across yet?
kassoe
(please excuse if this turns out to be a duplicate - I could not see my first attempt being posted on the list)
Bjorn Kassoe Andersen wrote:
I want specific words and graphics to be displayed in a templated box if a page belongs to a specific category (if the page does not belong to this category, a default text/graphic should be displayed).
I suppose if you create a magic word that returns true or false depending on the page's membership in a category, you could put this in a template using parser functions.
Magic word creation is documented at: http://www.mediawiki.org/wiki/Manual:Magic_words
Mike
Bjorn Kassoe Andersen wrote:
I want specific words and graphics to be displayed in a templated box
if a
page belongs to a specific category (if the page does not belong to
this
category, a default text/graphic should be displayed).
I think you could do it in a new skin for your wiki. You want a box somewhere on the page (a new div maybe?).
$cats = $wgTitle->getParentCategories(); If ( array_key_exists($specialCat, $cats) { //Words and text } else { //Just a logo }
That's assuming you don't mean what more experienced wiki people mean by 'templated'.
-Courtney
Hmm - here it is more precisely: I want a specific graphics file (or in some cases just a specific word) to display on a page if the page in question belongs to a specfic category.
The graphics file or the word is to be displayed inside a table. I called the table "templated" because it will in use on many different pages - and I have yet to learn a lot about Mediawiki :-)
kassoe
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Christensen, Courtney Sent: 14. august 2008 20:53 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Best way to IF(category) THEN (display something)
Bjorn Kassoe Andersen wrote:
I want specific words and graphics to be displayed in a
templated box if a
page belongs to a specific category (if the page does not belong to
this
category, a default text/graphic should be displayed).
I think you could do it in a new skin for your wiki. You want a box somewhere on the page (a new div maybe?).
$cats = $wgTitle->getParentCategories(); If ( array_key_exists($specialCat, $cats) { //Words and text } else { //Just a logo }
That's assuming you don't mean what more experienced wiki people mean by 'templated'.
-Courtney
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org