This is an old revision of the document!


CUSTOM_BLOCKS

FIXME (Translate)

Grundlagen

CUSTOM_BLOCKS sind mit das Beste kleine Ding an phpwcms. Richtig angewendet geben sie Dir benahe unendliche Möglichkeiten bei der Gestaltung Deines Layouts / Designs.
Beispielsweise kannst Du einen Content Part HTML mit zwei Spalten einfügen wenn nötig und diese zwei Spalten ansprechen mit anderen Content Parts. Das ist wirklich cool und wir werden Dich mit den Grundlagen dazu versorgen und auch mit ein paar Code-Schnipseln zum Kopieren….
FIXME

Set 'em up!

To have a working set of CUSTOM_BLOCKS at first you should sit down, lean back and do some little sketches how they would fit best and do some consideration about their naming convention.
Well, you could do so, but you can jump into it right now:

They are in "Page Layout"!

Go ahead and open (well, we are working with the back end ;-) ) admin » page layout » your special_page_layout (or the default if you have never done that before). Here you will find a field labeled “custom”. Fill in some blocks:

ABOVE_CONTENT, COL1, COL2

Save your page layout!
FIXME

They are in "templates" too!

Now you'll like to navigate to admin » templates to select a template. If you have done that never before there will be a default template still to be opened. Here you can assign your previously changed page layout.
After saving it you will find your CUSTOM_BLOCKS below.
FIXME

Populate 'em!

Look for that field labeled “ABOVE_CONTENT” and fill in something like

<div class="splash">
<div class="splash-inner">
<div class="splash-innerpadding clearfix">{ABOVE_CONTENT}</div>
</div>
</div>

and save again. Nothing has happened, nothing did hurt? Fine!
FIXME

Treat your page layout

Assuming that you are setting up your page by rendering it custom (from template's main block) you now can place your CUSTOM_BLOCK right above your content like so:

<!--other stuff before-->
{ABOVE_CONTENT}
{CONTENT}
<!--other stuff after-->

FIXME <note important>Jedesmal, wenn Du einen CUSTOM_BLOCK hinzufügst oder entfernst, solltest Du alle Deine Seitenvorlagen einmal editieren und abspeichern, um dem System die neuen Einstellungen zu übergeben. Andernfalls kannst Du nämlich beim Editieren Deiner Artikel keine Deiner CUSTOM_BLOCKS als Ausgabeort auswählen!</note>.

Targeting your new blocks

Peeew! That's done! LOL
Come on - we are quite there!

Edit your article

When opening your article and editing / adding a new Content Part you will find your newly created blocks by pulling down that pull down menu labeled “display”. Here you will define the output location. Since your main article (the headline, sub headline and teaser text) is always displayed within {CONTENT} you are able to place a Content Part right above of it by choosing “ABOVE_CONTENT” as it's output location. This is pretty cute / neat / tricky whatever ;-)
And because of the order of your three new blocks you even can nest them so that COL1 and COL2 can reside within ABOVE_CONTENT (in case you'd like to do so ;-)
But this is a completely different story
FIXME

Many ways to Rome

FIXME

deutsch/phpwcms-system/admin/vorlagen/custom_blocks.1269269725.txt.gz · Last modified: 2018/06/03 18:06 (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