DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:wp_to_dw_template

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:wp_to_dw_template [2015-09-26 17:52] Aleksandrdevel:wp_to_dw_template [2023-02-28 13:29] (current) – Link to new dokuwiki repo saggi
Line 15: Line 15:
   * Read about the [[:main window]] to understand words and functionality used in the following.   * Read about the [[:main window]] to understand words and functionality used in the following.
   * Refer to [[devel:templates]] and [[devel:templates:main.php]] to read what every DW function is used for.   * Refer to [[devel:templates]] and [[devel:templates:main.php]] to read what every DW function is used for.
-  * Refer to [[#WP vs DW functions]] for knowing which WP function can be substituted with which DW function.+  * Refer to [[#WP vsDW functions]] for knowing which WP function can be substituted with which DW function.
  
 ==== Meta elements ==== ==== Meta elements ====
Line 21: Line 21:
 Copy any relevant meta elements (anything between ''%%<head></head>%%'') from WP's ''header.php'' which DokuWiki doesn't already provide into DW's ''main.php''. Copy any relevant meta elements (anything between ''%%<head></head>%%'') from WP's ''header.php'' which DokuWiki doesn't already provide into DW's ''main.php''.
  
-Check if the WP theme adds anything to the body classes via ''add_filter( 'body_class', [...] );''. If yes, add them to the element which includes the ''tpl_classes()''. In case that element is not the ''body'' and the CSS contains any body selectors with such classes (''body.''), you would either need to move the ''tpl_classes()'' into the ''body'' or change the CSS accordingly (e.g. by just removing the ''body.'' in such cases).+Check if the WP theme adds anything to the body classes via ''add_filter( 'body_class', [%%...%%] );''. If yes, add them to the element which includes the ''tpl_classes()''. In case that element is not the ''body'' and the CSS contains any body selectors with such classes (''body.''), you would either need to move the ''tpl_classes()'' into the ''body'' or change the CSS accordingly (e.g. by just removing the ''body.'' in such cases).
  
 ==== Site containers ==== ==== Site containers ====
Line 100: Line 100:
 === Language strings === === Language strings ===
  
-Whenever the core ''$lang'' (in [[https://github.com/splitbrain/dokuwiki/blob/master/inc/lang/en/lang.php|inc/lang/en/lang.php]]) already contains a language string you need, you can simply use ''$lang['foo']''. But if you need any other language string, you need to add your ''lang/en/lang.php'' file to your template. Then you can use any string in there with ''tpl_getLang('bar')''.+Whenever the core ''$lang'' (in [[https://github.com/dokuwiki/dokuwiki/blob/master/inc/lang/en/lang.php|inc/lang/en/lang.php]]) already contains a language string you need, you can simply use ''$lang['foo']''. But if you need any other language string, you need to add your ''lang/en/lang.php'' file to your template. Then you can use any string in there with ''tpl_getLang('bar')''.
  
  
Line 229: Line 229:
 There are certain functionalities which both DW and WP have but which are expressed in different class names. There are certain functionalities which both DW and WP have but which are expressed in different class names.
  
-^What ^WordPress ^DokuWiki^ +^ What                            ^ WordPress                                            ^ DokuWiki    
-|hide something accessibly |screen-reader-text |a11y| +|hide something accessibly        |screen-reader-text                                    |a11y         
-|clearing floats |clear |group| +|clearing floats                  |clear                                                 |group        
-|align media left |alignleft |medialeft| +|align media left                 |alignleft                                             |medialeft    
-|align media right |alignright |mediaright| +|align media right                |alignright                                            |mediaright   
-|align media centred |aligncenter |mediacenter| +|align media centred              |aligncenter                                           |mediacenter  
-|menu item with children |li.menu-item-has-children |li.node| +|menu item with children          |li.menu-item-has-children                             |li.node      
-|selected menu item |li.current_page_item%%|%%current-menu-item|li .curid| +|selected menu item               |li.current_page_item%%|%%current-menu-item            |li .curid    
-|parent(s) of selected menu item|li.current_page_ancestor \\ + li.current_page_parent|(//n/a//)|+|parent(s) of selected menu item  |li.current_page_ancestor \\ + li.current_page_parent  |(//n/a//   |
  
  
devel/wp_to_dw_template.1443282741.txt.gz · Last modified: 2015-09-26 17:52 by Aleksandr

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