This is an old revision of the document!

Conditional Replacers

This makes it possible to show or hide code in dependance of having content or not. If no content no code is generated
This way our source code remains clean an will not be “polluted” by any empty and unneccessary stuff.

The Principle

to make it happen, there are some BasicWrapper An example by Oliver: Forum

            <section class="header-content">{HEADER}</section>
        <div class"main[LEFT] has-marginal-left[/LEFT][RIGHT] has-marginal-right[/RIGHT]">
            <section class="col-left">{LEFT}</section>
            <section class="col-left">{RIGHT}</section>
            <p>&copy; 2015 Whatever</p>
            <section class="footer-content">{FOOTER}</section>

This also counts for CUSTOM_BLOCKS


[BLOCK_ELSE]<tag>och nö, fehlt</tag>[/BLOCK_ELSE]



Want some examples?

really? Here is the first, very simple
<code html> [LEFT]

<div class="col-md-3">
<div class="col-md-9">


<div class="col-md-12">

[/LEFT_ELSE] <code> What does it do? Right what it should: in case {LEFT} has no content the main content will expand to 12 columns. Otherwise there is a column 3 and column 9 (bootstrap)

english/phpwcms-system/admin/template/conditional_replacers.1423588749.txt.gz · Last modified: 2018/06/03 18:07 (external edit) 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