DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:pagetitle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
plugin:pagetitle [2015-09-23 15:13] – [Development] s.saharaplugin:pagetitle [2021-06-23 14:32] – Incompatibilities with 2020-07-29 Hogfather porg
Line 1: Line 1:
-====== Page Title Plugin ======+====== PageTitle Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: Macro to set the title of page instead of the first heading text of the page.+description: Define a title of the wiki page by <title> tag. This plugin allows to write decorative title on the page with setting plain title text in metadata storage.
 author     : S.Sahara  author     : S.Sahara 
 email      : sahara.satoshi@gmail.com  email      : sahara.satoshi@gmail.com 
 type       : syntax type       : syntax
-lastupdate : 2014-08-10 +lastupdate : 2019-09-29 
-compatible : Ponder Stibbons+compatible : 2014-09-29d, 2015-08-10a, 2016-06-26a, 2017-02-19b, 2018-04-22a, !Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
-similar    :  +similar    : meta 
-tags       : title+tags       : title, breadcrumb
  
-downloadurl: http://github.com/ssahara/dw-plugin-pagetitle/zipball/master +downloadurl: https://github.com/ssahara/dw-plugin-pagetitle/zipball/master 
-bugtracker : http://github.com/ssahara/dw-plugin-pagetitle/issues +bugtracker : https://github.com/ssahara/dw-plugin-pagetitle/issues 
-sourcerepo : http://github.com/ssahara/dw-plugin-pagetitle/+sourcerepo : https://github.com/ssahara/dw-plugin-pagetitle/
 donationurl:  donationurl: 
  
Line 21: Line 21:
  
 ===== Installation ===== ===== Installation =====
 +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:plugin installation instructions]] on how to install plugins manually.
  
-Install the plugin through the [[plugin:extension|Extension Manager]] or [[plugin:plugin|Plugin Manager]] using the download URL above, which points to latest version of the plugin. Refer to [[:plugin_installation_instructions|plugin installation instructions]]. 
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
-The plugin provides the **title macro** that will overwrite the ''title'' [[:metadata]]. If your DokuWiki is configured with [[config:useheading]] (as titleoption enabled, the title of page will become the text specified in this macro, instead of the first heading text of the page.+====Define and render a title of the wiki page ==== 
 + 
 +  <title classes #id> 
 +  **Page Title** plugin for DokuWiki 
 +  </title> 
 + 
 +The specified title becomes the title of HTML document in combination with your DokuWiki site [[config:title]]. You may need to set [[config:useheading]] option to "navigation" (other than "0"in order to show specified title in the browser title bar. 
 + 
 +You can use **bold**//italic//, <sup>superscript</sup> and <sub>subscript</sub> text to show appropriate title on the page. The formatted page title is shown on the page, but it is converted to a plain text for the title of HTML document. The pagetitle plugin overwrites 'title' value of the [[devel:metadata]] to store the plain title text
 +You can give ''classes'' or ''#id'' to the title element (%%<h1>%%) if [[plugin:wrap|wrap]] plugin is available in your wiki site.  
 + 
 + 
 +When there are multiple ''<title>'' entries in a page, the first entry should be effective. 
 + 
 +If you want to set a page title without showing itself on the pageyou can instead use following syntax macro: 
 + 
 +  ~~Title: Page Title plugin for DokuWiki ~~ 
 + 
 +=== CSS for PageTitle === 
 + 
 +You can use class selector "pagetitle" for the HTML element of Page Title rendered in the page. 
 + 
 +<code css> 
 +.dokuwiki h1.pagetitle { 
 +    text-align: center; 
 +
 +</code> 
 + 
 + 
 + 
 +==== Hierarchical breadcrumbs on the page ==== 
 +(expermental) 
 + 
 +  <!--YOU_ARE_HERE--> 
 + 
 +This syntax allow you to put a hierarchical breadcrumbs in the page. The place holder ''%%<!--YOU_ARE_HERE-->%%'' is replaced by the hierarchical breadcrumbs provided by this plugin,  which uses page id for a breadcrumbs name independently from [[config:useheading|$conf('useheading')]] setting. 
 + 
 +  ~~ShortTitle: pageTitle ~~ 
 + 
 +ShortTitle macro is additionally available if you want use shorter title instead of (longer) pagetitle in the hierarchical breadcrumbs.
  
-  ~~Title: some page title which different from the first heading~~  
  
-Maybe useful if you want to have shorten text for title and breadcrumbs. Please note that **title macro** does not create any output itself. 
  
-The **ShortTitle** macro is also available and will create the ''shorttitle'' metadata of the page. It is originally intended to be used as a breadcrumbs text and to separate from a title text. However, DokuWiki core does not use the ''shorttitle'' metadata, and there is no plugin supports it. <file>~~ShortTitle: Text for breadcrumbs~~</file>  
  
  
 ===== Development ===== ===== Development =====
 +
 {{rss>https://github.com/ssahara/dw-plugin-pagetitle/commits/master.atom date 5}} {{rss>https://github.com/ssahara/dw-plugin-pagetitle/commits/master.atom date 5}}
 +
      
 === ToDo/Wish List === === ToDo/Wish List ===
  
-  * ''%%<title>%%'' syntax to define pagename (title of the page) on the page (v2 branch) +  * ''%%<title>%%'' syntax to define pagename (title of the page) on the page (v2 branch) -> done in release 2015-09-24 
-  * '''%%<!--YOU_ARE_HERE-->%%'' syntax to show a Hierarchical breadcrumbs on the page (v2 branch)+  * '''%%<!--YOU_ARE_HERE-->%%'' syntax to show a Hierarchical breadcrumbs on the page (v2 branch) -> done in release 2015-09-24
  
 ===== Known Bugs and Issues ===== ===== Known Bugs and Issues =====
  
 +==== Incompatibilities with 2020-07-29 Hogfather ====
 +[[https://github.com/ssahara/dw-plugin-pagetitle/issues/19|(Re-)activating the plugin should clear/regenerate the caches]]
 +[[https://github.com/ssahara/dw-plugin-pagetitle/issues/20|Visible title syntax: Rendered in page but not put into html head title]]
 +[[https://github.com/ssahara/dw-plugin-pagetitle/issues/21|Invisible title syntax: Rendered as raw markup AND not put into html head title]]
 +
 +==== parse error after upgrade ====
 +After I did an upgrade to the most recent version of the plugin, my dokuwiki instance became dysfunctional (white screen of death). The logs of my apache2 server contained this hint:
 +
 +  [Wed May 08 00:17:48.543750 2019] [:error] [pid 19136] [client 130.75.103.103:35866] PHP Parse error:  syntax error, unexpected '=' in /srv/www/iqwiki.iqo.uni-hannover.de/lib/plugins/pagetitle/syntax/shorter.php on line 72
 +
 +The server runs on PHP 7.0 . Dokuwiki itself is on greebo.
 +
 +--- [[user>KaiMartin|KaiMartin]] //2019-05-08 00:23//
 +
 +>  Just a hint from me: As far as I can see, you are not using Greebo... (The icons are not from Greebo.) --- [[user>Michaelsy|Michael Sy.]] //2019-05-08 00:45//
 +
 +>  The plugin requires PHP 7.1.x or later. However, PageTitle release 2019-05-08 should work with PHP 7.0.x that has already ended its life. Please refer to https://www.php.net/supported-versions.php   --- [[user>s.sahara|s.sahara]] //2019-05-08 00:56//
 +
 +I can confirm functionality on PHP7.1. Maybe you should correct your commit description on github. ''PHP 7.0.x support'' is a little misinterpretative. ;)
 + --- [[user>punkt|Punkt]] //2019-06-25 13:30//
 +
 +Pagetitle makes my Detritus crash (error 500), at mekineer.com.  PHP version: <del>7.3.6</del> sorry, it was actually running 5.6.40.  I updated my site to use 7.0.x, and pagetitle works now.
  
 +I'm a bit confused about functionality.  I am using indexmenu plugin, and want the URL path for the menu.  However, I want the page title to be what's in <title> This way, I can keep my menu with brief names, yet have the page title be more descriptive.  Is this not possible?   --- [[user>mekineer|mekineer]] //2020-01-16 02:51//
plugin/pagetitle.txt · Last modified: 2021-06-23 14:32 by porg

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki