Static Blocks ("Include Entry" plugin revised)

The plugin Markup: Include entry data/ templates/ blocks (serendipity_event_includeentry) has received a major update to version 2.0 of the plugin.

Formerly, this plugin supported to include portions of already written entries into a new entry via this kind of markup:

Thanks to the very smart suggestion of "Glamourguy", there's now a heap of extra-functionality for the plugin:

  • Creates a new menu item called "Template-Blocks". On this page you can administrate two types of content:
    • Templates: Here you can create text (title, body, extended) to use as actual templates for a new entry. You can choose a created template, and you will be forwarded to the "New Entry" screen, with the contents of your template already filled in. This helps you if you always create some kind of review texts or whatever, which you just mangle with actual content.
    • Blocks: This is some kind of "HTML nugget" block. Again you can create some text (title, body, extended). Those block can later be attached to any entry (see the "Extended Options" part when creating a new entry") or even be randomly distributed on the pages of your blog. This feature is very helpful if you want to create ad-blocks, subscription infos, reminders without the need to do lot of copy+paste work and have duplicate content!
  • It allows for several new config options:
    • Random block placement: This feature allows you to inject blocks on your blog entry listing randomly. You can define after which entry to start, the amount of articles before the next block appears, and whether a block should also be randomized if an entry already has an attached block.
    • Templated Blocks! The coolest thing about those "static blocks" is that EACH block can use an individual smarty template. The default is to show a block in an entry's design - but you can easily choose a different template for showing a block as an Ad-Block, an iframe, or everything else. You can even abuse the functionality to put actual (surrounding or replacing) content and the usual smarty markup into the block and tweak Serendipity to the max.
    • Category-dependant: You can choose whether to show randomized blocks on the startpage, or any combination of categories. So you can select to only show random blocks on the frontpage, or only in Category X (and Y and Z, but not A and B).
    • Apply Markup transformations to blocks. Of course, each block can use the markup plugins you defined to allow usage of Wiki/Textile/nl2br/smilies/whatever plugins. Or not. It's up to you!
  • And of course, it allows a new way of including blocks WITHIN entries (completely smarty-parsed) with this kind of code:
    [s9y-include-block:47] (includes the actual content only)
    [s9y-include-block:47:template] (includes the smarty-parsed content)

Did I mention this plugin even works with 0.8 already? Have a look at it and have fun - and report bugs, if you find any. It's still a bit beta-ish. ;-)

The plugin is available throughout the usual suspects: Spartacus (s9y Plugin-Repository) and CVS repository.


Trackback-URL für diesen Eintrag

  • Keine Trackbacks


Ansicht der Kommentare: (Linear | Verschachtelt)

Noch keine Kommentare

Kommentar schreiben

Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.

BBCode-Formatierung erlaubt
Markdown-Formatierung erlaubt