Page 1 of 1

Navigation-plugin: Parent-pages link to first child

Posted: Tue Aug 25, 2020 11:50 pm
by bnetz
Hi,
when I use the navigation-plugin the parents link to the first child (instead to itself) - see attachment.

Interestingly the same thing happened when I manually tried to generate links in the docsx-theme-sidebar - using something like

Code: Select all

$parents = buildParentPages();
	foreach ($parents as $parent) {
		echo '<a href="'.$parent->permalink().'">'.$parent->title().'</a>';
(simplified code) leads to the same problem as described.

So in my installation $parent->permalink() outputs something which could be described as $firstchild->permalink()
I don't have any cue what's going on - might be a bug?

Thanks for help in advance!

Re: Navigation-plugin: Parent-pages link to first child

Posted: Wed Aug 26, 2020 11:21 am
by Edi
This is how the theme works by default, and parent pages are used only for the titles of the chapters.

You can set in the file init.php in the directory /bl-themes/docs-x (line5):

Code: Select all

$REDIRECT_PARENT_TO_FIRST_CHILD = false;
instead of

Code: Select all

$REDIRECT_PARENT_TO_FIRST_CHILD = true;

Re: Navigation-plugin: Parent-pages link to first child

Posted: Wed Aug 26, 2020 11:29 am
by bnetz
Ah, this explains a lot :-)

I am not sure if it should be considered to change the default behaviour to false.

Thanks for your help, Edi!

/solved