Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
Configuration:Useheading while IndexMenu shows Namespace
Avatar
mekineer #1
Member since Mar 2018 · 33 posts
Group memberships: Members
Show profile · Link to this post
Subject: Configuration:Useheading while IndexMenu shows Namespace
I would like the page titles, the ones that show up in the tab of a web browser, to be assigned by the first heading of the page.  I would also like IndexMenu to show the menu using the namespaces.  If I enable the UseHeading option, then IndexMenu shows the title instead of the namespace.

Is this possible for IndexMenu to show the namespace despite the UseHeading option, and how?  I try to read the IndexMenu instructions, and I can't understand anything.
This post was edited on 2020-01-30, 00:20 by mekineer.
Avatar
mekineer #2
Member since Mar 2018 · 33 posts
Group memberships: Members
Show profile · Link to this post
I edited the first post for clarity
Avatar
mekineer #3
Member since Mar 2018 · 33 posts
Group memberships: Members
Show profile · Link to this post
I'm trying to change the code for the IndexMenu plugin.

So far, in syntax/indexmenu.php, I have removed the following code:

            if($conf['useheading'] == 1 || $conf['useheading'] === 'navigation') {
                $title = p_get_first_heading($id, FALSE);
            }

And have shortened the following function:

    private function _getTitle($ns, $headpage, &$hns) {
        global $conf;
        $hns   = false;
        $title = noNS($ns);
        return $title;
    }

For me, IndexMenu continues as if I had not made any changes... the useheading option still results in the title being used instead of the namespace.


For Dokuwiki, I tried removing the following code in inc/common.php:

        $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE);

Removed from the following section of code:

    // page names
    $name = noNSorNS($ID);
    if(useHeading('navigation')) {
        // get page title
        $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE);
        if($title) {
            $name = $title;
        }
    }

However, still no change in behavior.
This post was edited 2 times, last on 2020-02-05, 16:53 by mekineer.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-17, 08:54:21 (UTC +01:00)