Skip to content

Feature:liststyle for depth>1#7

Open
obel1x wants to merge 3 commits intocosmocode:masterfrom
obel1x:master
Open

Feature:liststyle for depth>1#7
obel1x wants to merge 3 commits intocosmocode:masterfrom
obel1x:master

Conversation

@obel1x
Copy link

@obel1x obel1x commented Sep 9, 2018

I needed use depth > 1, but resulting list was quite unstructured.

So i added Parameter liststyle=[STYLE] to make it more structured.
where style can be one of:
default - the same as not given
relative - will print relative names for pages
full - will print fully qualified pagenames

Other styles could also be implemented, but this was already fine for my needs.
What do you think?
Regards, Daniel

Adds Parameter liststyle=[STYLE] to use together with depth>1.
where style can be one of:
default - the same as not given
relative - will print relative names for pages
full - will print fully qualified pagenames
@obel1x obel1x changed the title New Version +Feature:liststyle Feature:liststyle for depth>1 Sep 9, 2018
@obel1x obel1x closed this Nov 10, 2018
@obel1x obel1x reopened this Nov 10, 2018
@obel1x
Copy link
Author

obel1x commented Nov 20, 2018

@cosmocode could you please review this pr

@bvdbos
Copy link

bvdbos commented May 18, 2021

I would really like this! Could this be merged?

@nerun
Copy link

nerun commented Nov 20, 2022

I totally aprove this!

For example:

Full:

{{nslist>. liststyle=full}}

wiki:projetos:projetos_de_traducao
wiki:projetos:start

Relative:

{{nslist>. liststyle=relative}}

projetos_de_traducao
start

Default:

{{nslist>. liststyle=default}} OR {{nslist>.}}

projetos_de_traducao
projetos

For me there is just one single problem: is missing an option that show page without underscore and uppercase (@!!PAGE@), like in namespace templates.

If i insert this code, at line 124:

elseif($data['liststyle'] == human')
    {
        $item['id_name'] = ucwords(str_replace('_', ' ', substr($item['id'],strlen($data['ns'])+1)));
    };

Gives me this:

{{nslist>. liststyle=human}}

Projetos De Traducao
Start

Not exactly what i want, but much better. I want this:

Projetos de Tradução
Projetos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants