-
-
Notifications
You must be signed in to change notification settings - Fork 909
Allow to display page title in format: #3019
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
Conversation
PageTitle | ParentNamespaceTitle | ParentParentNamespaceTitle | ... | RootNamespaceTitle
phy25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the intention of the change? Can it be acheived by using your own template? In the meantime the unit tests are failing.
| global $conf; | ||
| $start = $conf['start']; | ||
|
|
||
| // namespace names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
|
For me the purpose of the proposal is unclear as well. |
My intention is simple. I like title in the format described in my first post. Maybe later html title can be parametrized in configuration to use custom formats. |
|
I think we need a discussion on how to improve the title if you think it needs improvement - definitely you provided what you think it can be :-). In order to make this ready to merge, you need to modify the unit test affected by your change in the first place. |
| <html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that you remove $conf['title'] from the title tag, which is a big change. Do you mind explaining why this is preferred?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use Translator plugin and actually have :start page with title same as my dokuwiki title, because it is shown also in bread crumbs navigation. So adding wiki title again would only duplicate it at the html title text end.
|
This title is used in the tabs of the browser, and sometime in the upper bar of a window. Or in the tab choicer, if you switch tabs. |
Also I would like to point out that templates can override this title style in the way that the template developer prefers, so if you just want to customize your wiki, you can do so by creating a new template, and it can be kept across DokuWiki core upgrade. When you submit a patch here, it will be the default for everyone using the default template, so we take it more seriously and need to judge what approach/implementation would be better. |
Co-Authored-By: Henry Pan <github@phy25.com>
Co-Authored-By: Henry Pan <github@phy25.com>
Well I would like to somehow keep my title style across wiki upgrades. As I said, we could make it as an alternative of current title. |
Unfortunately this is the only way you can do it without modifying DokuWiki core. Also as I mentioned before, templates have to implement this title style in the way that the template developer prefers, so this patch would be essentially the default template's title only. A lot of templates do reimplement how this title is shown indeed, e.g. template:bootstrap3.
I actually don't quite see the value of such a title format. If this patch gets some thumb-ups or other collaborators see the value, we may be able to move forward. |
|
I just thought of one approach of adding an event hook here, so plugins can override the title. If this sounds good a new issue can be created. |
|
I vote for not implementing this. There are ways to implement it with your own template or you could use JavaScript to adjust it. |
I have no problem with this. |
|
As I mentioned currently template implement this themselves. There is no elegant way to force existing templates to change the title i.e. even if we implement something about this, it will not work on templates that do not adapt. I am going to close this PR except other people have interest in this option. You can open a new issue to discuss other options. |
PageTitle | ParentNamespaceTitle | ParentParentNamespaceTitle | ... | RootNamespaceTitle