Open michitux opened 12 years ago
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:
_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?noheader
is also undesirable. I'd like to see a page title header instead. Maybe a pageheader
flag for this?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.
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
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.