DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:tpl_metaheader_output

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
devel:event:tpl_metaheader_output [2009-09-11 19:23] HåkanSdevel:event:tpl_metaheader_output [2023-08-06 14:23] (current) Klap-in
Line 17: Line 17:
 <code php> <code php>
 // Adding a meta value // Adding a meta value
-$event->data["meta"][] = array ( +$event->data["meta"][] = [ 
-  "name" => "DC.Subject", +    "name" => "DC.Subject", 
-  "content" => "Some information", +    "content" => "Some information" 
-);+];
  
 // Adding a stylesheet  // Adding a stylesheet 
-$event->data["link"][] = array ( +$event->data["link"][] = [ 
-  "type" => "text/css", +    "type" => "text/css", 
-  "rel" => "stylesheet",  +    "rel" => "stylesheet",  
-  "href" => DOKU_BASE."lib/plugins/myplugin/specialstyle.css", +    "href" => DOKU_BASE . "lib/plugins/myplugin/specialstyle.css" 
-);+];
  
 // Adding a JavaScript File // Adding a JavaScript File
-$event->data["script"][] = array ( +$event->data["script"][] = [ 
-  "type" => "text/javascript", +    "type" => "text/javascript", 
-  "src" => DOKU_BASE."lib/plugins/myplugin/javascript_library.js", +    "src" => DOKU_BASE . "lib/plugins/myplugin/javascript_library.js", 
-  "_data" => "", +    "_data" => "" 
-);+];
  
 // Adding JavaScript Code // Adding JavaScript Code
-$event->data["script"][] = array ( +$event->data["script"][] = [ 
-  "type" => "text/javascript", +    "type" => "text/javascript", 
-  "charset" => "utf-8", +    "charset" => "utf-8", 
-  "_data" => "addInitEvent(function(){comments_addButtons('$ID');});", +    "_data" => "addInitEvent(function(){comments_addButtons('$ID');});" 
-);+];
 </code> </code>
 Note: Note:
   * When you are adding the stylesheet or javascript file for compatibility with using slash as namespace separator in URLs you should prepend the file link with DOKU_BASE.   * When you are adding the stylesheet or javascript file for compatibility with using slash as namespace separator in URLs you should prepend the file link with DOKU_BASE.
-  * For adding the javascript file you should specify an empty "_datafield for generating of a closing "script" tag, otherwise you get an incorrect self closed "script" tag. +  * For adding the javascript file you should specify an empty ''_data'' field for generating of a closing "script" tag, otherwise you get an incorrect self closed "script" tag. 
- +  * You may use other tags as well 
-===== Plugins handling this event ===== +<code php> 
- +$event->data['style'][] 
-The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.+    'type'  => 'text/css', 
 +    '_data' => 'a {color: blue;}' 
 +]; 
 +</code>
  
-  * [[plugin:asciimath]], [[plugin:badbehaviour]], [[plugin:bloglinks]], [[plugin:code3]], [[plugin:description]], [[plugin:dokuwikifck]], [[plugin:googleanalytics]], [[plugin:indexmenu]], [[plugin:indexmenu2]], [[plugin:jquery]], [[plugin:keywords]], [[plugin:linkback]], [[plugin:loadskin]], [[plugin:meta_yaml]], [[plugin:metaheaders]], [[plugin:multitemplate_styleman]], [[plugin:new_page_dialog]], [[plugin:operawidget]], [[plugin:osm]], [[plugin:permissionstyles]], [[plugin:pxxo]], [[plugin:refnotes]], [[plugin:sioc]], [[plugin:statistics]], [[plugin:syntaxhighlighter]], [[plugin:userfly]], [[plugin:virtualkeyboard]], [[plugin:wysiwyg]] 
  
 ===== See also ===== ===== See also =====
  
 +  * [[codesearch>TPL_METAHEADER_OUTPUT|Code related to this event]] used in any DokuWiki's files, plugins and templates
   * [[devel:Action Plugins]]   * [[devel:Action Plugins]]
   * [[devel:Events]]   * [[devel:Events]]
  
  
devel/event/tpl_metaheader_output.1252689801.txt.gz · Last modified: 2009-09-11 19:23 by HåkanS

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