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

Page title functionality missing #3921

Closed
Guite opened this issue Aug 9, 2018 · 0 comments
Closed

Page title functionality missing #3921

Guite opened this issue Aug 9, 2018 · 0 comments
Labels
Milestone

Comments

@Guite
Copy link
Member

Guite commented Aug 9, 2018

Q A
Zikula Version 2.0.9
PHP Version any

Expected behavior

Page titles conform to the pattern configured in the Settings module (pagetitle modvar).

Actual behavior

Page titles consist only of the individual page titles. All other parts are missing.

Additional hints

The following code from the legacy PageUtil needs to be readded so the ParameterBag instance managing page vars can utilise it.

            if ('title' == $varname) {
                $title = System::getVar('pagetitle', '');
                if (!empty($title) && '%pagetitle%' != $title) {
                    $title = str_replace('%pagetitle%', $_pageVars[$varname]['contents'], $title);
                    $title = str_replace('%sitename%', System::getVar('sitename', ''), $title);
                    $moduleInfo = ModUtil::getInfoFromName(ModUtil::getName());
                    $moduleDisplayName = $moduleInfo['displayname'];
                    $title = str_replace('%modulename%', $moduleDisplayName, $title);

                    return $title;
                }
            }

cc @craigh

@Guite Guite added the Bug label Aug 9, 2018
@Guite Guite added this to the 2.1.0 milestone Aug 9, 2018
@Guite Guite modified the milestones: 2.1.0, 3.0.0 Nov 2, 2018
@Guite Guite closed this as completed in 2b9c55d Mar 22, 2019
Guite added a commit that referenced this issue Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant