[MediaWiki-l] Category list within a page

classic Classic list List threaded Threaded
4 messages Options
Bri
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Category list within a page

Bri
Greetings!

Is there a way to list the contents of a category within a non-category
page?


Example of what I want:

Page Foo:
A foo is a term that is uses as a stand-in or placeholder for other terms.

==Examples==
Dohicki
Foo
Thingamabob
Whatchamacallit

And I would like the examples to be dynamically created from category:foo.



_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Category list within a page

Nathan Larson
On Sat, Jan 18, 2014 at 12:22 PM, Bri <[hidden email]> wrote:

> Greetings!
>
> Is there a way to list the contents of a category within a non-category
> page?
>
>
> Example of what I want:
>
> Page Foo:
> A foo is a term that is uses as a stand-in or placeholder for other terms.
>
> ==Examples==
> Dohicki
> Foo
> Thingamabob
> Whatchamacallit
>
> And I would like the examples to be dynamically created from category:foo.


I think this will do it:
https://www.mediawiki.org/wiki/Extension:DynamicPageList_%28Wikimedia%29#category
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Category list within a page

Jan Steinman
> From: Nathan Larson <[hidden email]>
>
> On Sat, Jan 18, 2014 at 12:22 PM, Bri <[hidden email]> wrote:
>
>> Is there a way to list the contents of a category within a non-category
>> page?
>
> I think this will do it:
> https://www.mediawiki.org/wiki/Extension:DynamicPageList_%28Wikimedia%29#category

I would like to second the recommendation of DPL. This is a versatile extension that can do all sorts of page listing tasks, beyond what simple Categories can do!

For example, we wanted minutes of our meetings (which have names like "YYYYMMDD") to be listed in reverse-chronological order, so the newest meeting was always at the top. DPL to the rescue:

        ==Meeting minutes, newest first==
        {{#dpl:
        |category = History
        |order = descending
        |namespace = Minutes
        |columns = 5}}

produces:
        http://www.ecoreality.org/wiki/Category:History

We put the DPL code right on the Category page, but it can go anywhere.

Another example, you can morph the page title. I find this most useful on the "Category:Categories" page, so you can get rid of the "Category:" namespace:
        {{#dpl:
        |namespace = Category
        |format = ,\n* [[%PAGE%|%TITLE%]],,
        |columns = 5}}

produces:
        http://www.ecoreality.org/wiki/Category:Categories

Another example, you can include selected headings from pages into the DPL listing, and even put them in a table that can be re-sorted with a mouse click:
        {{#dpl:
        |ordermethod=lastedit
        |order=descending
        |category=Projects
        |include = #Project steward, #Need
        |includetrim=true
        |table=class="sortable", Project, Steward, Need}}

produces the table in:
        http://www.ecoreality.org/wiki/Category:Projects

Try it; you'll like it!

:::: Having access to raw milk through cow-share programs where devotees buy a share of a dairy herd for personal use and not for resale seems like an innovative and reasonable solution. -- Lana Popham
:::: Jan Steinman, EcoReality Co-op ::::
:::: (Send email to [hidden email] to get a random quote, or [hidden email] to get 50 random quotes. Put a word in the Subject line to filter for that word.)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Category list within a page

Nathan Larson
On Sun, Jan 19, 2014 at 1:30 PM, Jan Steinman <[hidden email]> wrote:

> I would like to second the recommendation of DPL. This is a versatile
> extension that can do all sorts of page listing tasks, beyond what simple
> Categories can do!


Indeed. It would seem that I wrote an almost entirely redundant extension,
CategoryGallery <https://www.mediawiki.org/wiki/Extension:CategoryGallery>,
that does the same thing as DPL's gallery
mode<https://www.mediawiki.org/wiki/Extension:DynamicPageList_%28Wikimedia%29#mode.3Dgallery>.
I try to search for such tools before I write new features, but apparently
my research fell short.
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l