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

Jetzt machen wir's!

Um einen Satz funktionsfähiger CUSTOM_BLOCKS zu bekommen, sind erst mal ein paar Vorüberlegungen fällig: Wie passt die Reihenfolge, wie benenne ich sie, damit ich später weiss, was sie tun und wie sie erscheinen usw.
Naja, so könntest Du verfahren, aber Du kannst natürlich auch gleich loslegen:

Sie werden im "Seiten- Layout" definiert!

Weiter geht's: Öffne (ok, wir arbeiten im Backend ;-) ) admin » seitenlayout » Dein spezial_seiten_layout (oder das default- Layout, falls Du noch nie ein eigenes angelegt hast). Hier findest Du ein Feld mit der Bezeichnung “Blöcke Eigene”. Schreib ein paar da rein:

OBERHALB_DES_INHALTES, COL1, COL2

Speichere dein Seitenlayout!
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.1270991025.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