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

add pagename as concatenated title option #264

Open
smarteyesi opened this issue Mar 17, 2021 · 2 comments
Open

add pagename as concatenated title option #264

smarteyesi opened this issue Mar 17, 2021 · 2 comments

Comments

@smarteyesi
Copy link

smarteyesi commented Mar 17, 2021

current example:

{{page>[namespace1:pagetitle:#section]&nofooter}}  

The above include would result in a section being included with title:

Section
Feature request/enhancement:

  1.  {{page>[namespace1:pagename:#section]&nofooter&showpagetitle}}  

The above include would result in a section being included with title:
Pagename Section
2. {{page>[namespace1:pagename:#section]&nofooter&showpagetitle&separator}} 

where separator can be configured in the plugin settings
The above include would result in a section being included with title:

Pagename:Section

@michitux
Copy link
Member

I totally agree that for includes of just a single section it would be beneficial to display more than just the section title in particular if this is combined with a namespace- or tag-based include where the section title will always be the same but the page won't be the same. I would prefer to make this more flexible, though. Instead of having flags that trigger two specific variants, I suggest to add a single flag with a value that is a template for the title. For example, you could then use {{page>[namespace1:pagename:#section]&nofooter&header=@PAGETITLE@: @SECTIONTITLE@}}. The only limitation would be that you cannot use & or }} in the text of the title. I suggest to use the same replacement patterns as in namespace templates, excluding the user- and date-based patterns and add @PAGETITLE@, @SECTIONTITLE@ and @TITLE@, the latter being the default value that corresponds to the current behavior, i.e., the page title for includes of the whole page and the section title for includes of a single section. I am open to suggestions how to name these new replacements and also the flag, my current suggestion would be to repurpose the existing header flag and simply parse its value when given. However, this might be difficult to represent in the admin interface, a new headerformat flag and configuration option could be an option, too.

@smarteyesi
Copy link
Author

A plexible way in how to do this would be benificial for all dokuwiki users

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

No branches or pull requests

2 participants