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

Include a specific section of each page in a namespace #91

Open
michitux opened this issue Jul 13, 2012 · 3 comments
Open

Include a specific section of each page in a namespace #91

michitux opened this issue Jul 13, 2012 · 3 comments

Comments

@michitux
Copy link
Member

As suggested in the forum at https://forum.dokuwiki.org/thread/4096 the include plugin could support including a specific section (e.g. "ToDo") of all pages in a certain namespace, excluding pages without this section.

@stephank
Copy link

This already seems to work with {{namespace>foo#section}}, though it's not documented anywhere.

I have two issues with how this currently works, and I'm happy to write code for this. Just need to know how we would like to see this happen:

  • If the section does not exist, _get_section defaults to including the entire page. I'd like to see this skip those pages instead. Perhaps this behaviour can be toggled for the {{namespace>...}} case, or should we add a flag?
  • The section headers are included, which is not very useful when all headers are the same, but noheader is also undesirable. I'd like to see a page title header instead. Maybe a pageheader flag for this?

@stephank
Copy link

Well, I've more or less hacked this in on a branch on AngryBytes/plugin-include. These changes are breaking, but it's just a prototype any way.

On that branch _get_section always skips pages if the specific section is missing. (Basically clearing the instructions array.)

I've replaced the noheader config option with header as one of section, page, or none. The header and noheader flags still work as expected, and there's a new pageheader flag.

@apr3ntice
Copy link

Any plans for bringing these changes to release?
I agree that it when including namespaces, pages without the desired section should be ignored by default

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