Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureRequest: additional parameter to display something else than page titles #29

Open
riess82 opened this issue Mar 21, 2021 · 5 comments

Comments

@riess82
Copy link

riess82 commented Mar 21, 2021

Great module!

What I would like to propose is another parameter like "include" and "exclude" to allow different things to display.
I am completely new to dokuwiki plugins, so I dont really know how to get another parameter included.

As a quick proof of concept, I have duplicated the plugin and changed the part of the actual output to not show the page titles, but the actual lines where the reference was made.

If someone could provide the functionaliy of an optional parameter, starting with the options of "name" (default) and "line", i would gladly throw in my code.

@mprins
Copy link
Owner

mprins commented Mar 21, 2021

Any change must preserve backwards compatibility with existing deployments

@riess82
Copy link
Author

riess82 commented Mar 21, 2021

Would another optional "#" plus ['name' or 'line'] be okay?
Resulting in {{backlinks>[pagename][#filterNS|!#filterNS][#name|#line]}}

That would be rather easy to accomplish, by inserting another check for "#" in the filter string.

@mprins
Copy link
Owner

mprins commented Mar 22, 2021

So what happens if you don't specify an include or exclude filter and you have a namespace called name?
I think you'd need to use a different modifier than #

@riess82
Copy link
Author

riess82 commented Mar 22, 2021

I built a working prototype now, using {{backlinks>.#!#line_sorted}} which was the most comprehensible format for me. I read it as "do not exclude anything" and "display the lines sorted". I decided that i'd build "line" and "line_sorted", because that sort might come in handy and is just one extra line.
I tested with:
{{backlinks>.}}
{{backlinks>testname}}
{{backlinks2>.#!#line_sorted}}
{{backlinks2>.#!nothing#line_sorted}}
{{backlinks2>.#something#line_sorted}}
If I read the documentation for naming pages correctly (and hoping it applies to namespaces as well), "#" is not allowed, so the second # should work fine from my humble understanding.

@sokolgeo
Copy link

May we simply add a configuration setting for this plugin?
In my case I'd like to have a way to always display page names in the backlinks list, regardless if the referring page has headings.
Or can we handle this with the above syntax? How would I put "show me the names of the pages linking to the current one, regardless if they have any headings inside - always show page names "?

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

No branches or pull requests

3 participants