Differences

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

english:phpwcms_replacer_rts:frontend_render:tag-site-structure [2009/11/28 15:09]
Knut Heermann (flip-flop)
english:phpwcms_replacer_rts:frontend_render:tag-site-structure [2018/06/03 18:09] (current)
Line 13: Line 13:
\\ \\
-**Procedure:** +===== Procedure: ===== 
In the site structure in the field ** "category infotext" ** by ** "HOME" ** // (ie ID = 0) // is entered a tag which controls the behavior of the RT in /frontend_render/ , e.g. In the site structure in the field ** "category infotext" ** by ** "HOME" ** // (ie ID = 0) // is entered a tag which controls the behavior of the RT in /frontend_render/ , e.g.
-<file>[JAHRESZEITEN] #Tag1, #Tag2, Tag3,.#Tag4,...[/JAHRESZEITEN]</file>+<file>[JAHRESZEITEN] #Tag1, #Tag2, Tag3, #Tag4,...[/JAHRESZEITEN]</file>
The wrapper **[JAHRESZEITEN]** separates the tags from the remaining entries in this field. \\ The wrapper **[JAHRESZEITEN]** separates the tags from the remaining entries in this field. \\
Not valid tags are simply disabled by using a leading **#**. //(In the above example the tag **Tag3** is active). // Not valid tags are simply disabled by using a leading **#**. //(In the above example the tag **Tag3** is active). //
Line 39: Line 40:
-**CSS:** \\+===== Replace css file: ===== 
A new CSS file is loaded, depending on the day. In order not to change the load sequence of the CSS files, a dummy or a fallback CSS file is created in template/inc_css/* and in the correct place in the template involved. A new CSS file is loaded, depending on the day. In order not to change the load sequence of the CSS files, a dummy or a fallback CSS file is created in template/inc_css/* and in the correct place in the template involved.
Line 71: Line 73:
{{:deutsch:ersetzer_rts:frontend_render:be_template03-3_1.gif|}} {{:deutsch:ersetzer_rts:frontend_render:be_template03-3_1.gif|}}
-----+
\\ \\
 +
 +===== Replace content: =====
 +
 +
 +Of course, it is also possible to share certain content.
 +
 +In the lower section of the script **V1.1** are shown some examples //(Custom Functions)//.
 +
 +**Bsp01.:** direct replacement in the template/content //direktes ersetzen im Template/Content//
 +  * The php function ##str_replace('Suchmuster', 'wird ersetzt durch', 'zu durchsuchender Inhalt');## is used. \\ $content['all'] = str_replace('Suchmich Wort',Tolles Wort', $content['all']);
 +
 +\\
 +
 +**Bsp02.:** Replace with wrapper in template/Content
 +
 +In template/content we see e.g.: "Jetzt **[SEASON]**im Jahr ist es farbig**[/SEASON]**."
 +
 +  * With the help of the built-in-funtion ##replace_cnt_template('crawler content', 'TAG', 'is replaced by');## it can quite easily be implemented. \\ $content['all'] = replace_cnt_template($content['all'], SEASON, 'im Winter ist es weiß');
 +
 +
 +
 +\\
 +
 +**Bsp03.:** Replacing with tag **{TAG}** in template/content
 +
 +In template/content we see e.g.: "Jetzt ist der **{SEASON}** da."
 +
 +  *  As noted above, here the php function ##str_replace(...); ## used. \\ $content['all'] = str_replace('{SEASON}', 'Winter', $content['all']);
 +
 +\\
 +
 +The safe side now needs to be examined whether there are wrapped-snippets are present in the content //(This happens for example if no TAG is true )//.
 +
 +In addition we must have a look to the pre-setting //(fallback)// like e.g., **{ERSETZE}**. If no tag from our list matches, a default value must be registered here. \\
 +
 +  * $content['all'] = str_replace('{ERSETZE}', 'default value', $content['all']);  
 +
 +
 +
 +
 +
 +
 +
 +\\
 +
 +
 +
 +===== Code: =====
 +
**rt_tag_in_site_structure** V1.0  26.11.09   **rt_tag_in_site_structure** V1.0  26.11.09  
Line 98: Line 149:
----- 
----- 
\\ \\
-===== Code ===== 
 +----
 +\\
 +
 +**V 1.0:**
<code php |h rt_tag_in_site_structure |h > <code php |h rt_tag_in_site_structure |h >
<?php <?php
english/phpwcms_replacer_rts/frontend_render/tag-site-structure.1259417392.txt.gz · Last modified: 2018/06/03 18:08 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0