Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (rex::isBackend()) {
- // Ausgabe im Backend ohne Wrapper
- echo 'item';
- return;
- }
- // Aktueller Slice
- $slice = '<li>item</li>';
- // Wrapper-Präfix und -Suffix
- $prefix = '<ol>';
- $suffix = '</ol>';
- // Ab hier nichts verändern
- if (!function_exists('rex_module_content_REX_MODULE_ID')) {
- ob_start();
- function rex_module_content_REX_MODULE_ID($prefix, $suffix, $slice)
- {
- static $content = '';
- static $last = '';
- $out = ob_get_clean();
- if ($last != $out) {
- echo $out;
- $content = '';
- }
- ob_start();
- $content .= $slice;
- $last = $prefix.$content.$suffix;
- echo $last;
- }
- }
- rex_module_content_REX_MODULE_ID($prefix, $suffix, $slice);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement