示例#1
0
/* Layoutklassen */
$layout_classes = array();
$layout_classes["bildblock"] = "col-lg-8 col-sm-8 bild";
$layout_classes["textblock"] = "col-lg-4 col-sm-4 text";
/* Layout switcher */
$def_lang = c::get("lang_layouts") ? c::get("lang_layouts") : $site->defaultLanguage()->code();
$layout_data_obj = set_up_layout_data(yaml($data->content($def_lang)->layout_switcher()));
$layout_data = $layout_data_obj["layout_data"];
$layout_classes = array_merge($layout_classes, $layout_data_obj["layout_classes"]);
$layout_classes = get_layout_classes_v2($layout_data, $layout_classes);
// Bilder sammeln
$slides = $data->children()->visible();
$slideimages = array();
$slidetexte = array();
foreach ($slides as $slide) {
    foreach (get_images_from_article($slide) as $key => $items) {
        if (!isset($slideimages[$key])) {
            $slideimages[$key] = array();
        }
        foreach ($items as $item) {
            array_push($slideimages[$key], $item);
        }
    }
    array_push($slidetexte, $slide->text());
}
if (sizeof($slideimages) == 0) {
    $slideimages = $bilder;
}
?>

<?php 
示例#2
0
文件: ajax.php 项目: cnoss/fubix
<?php

// File with global functions
include 'assets/php/functions.php';
//include 'assets/php/functions-lumm.php';
$find = get('path') . "/" . get('id');
$find = preg_replace("=ajax/=", "", $find);
$container = $pages->find($find);
$template = get('template');
$idx = get('idx');
/*echo $find . "<hr>";
echo $template . "<hr>";
echo $container->title(); 
*/
// if no article could be found for that id…
if (!$container) {
    die('Invalid article ID');
}
// Zusaetzliche Klassen
$classes = get_additional_classes($container, $site);
// Bilder holen
$bilder = get_images_from_article($container);
// Dokumente holen
$docs = structhelper::get_documents_from_article($container);
// Snip holen
$template = atomicdesign::get_snip($container->uid(), "default");
$template = atomicdesign::get_snip($container->intendedTemplate(), $template);
snippet($template, array('content' => $container, 'snippet' => $template, 'class' => $container->layout(), 'bilder' => $bilder, 'docs' => $docs, 'behavior_classes' => $classes["behavior_classes"], 'heading' => false));
示例#3
0
        $teaser_count++;
        ?>

	<div class="teaser--item <?php 
        echo $overview_style["classes"];
        ?>
">
		<?php 
        $teaser_image = false;
        // Wurde ein Teaserbild definiert?
        $r = preg_replace("=.*?_partner/=", "", $container->root());
        $selected_img = array("/_partner/" . $r . "/" . $container->content()->select_image());
        $bilder = get_images_from_article(false, false, $selected_img);
        // Wenn nein, dann nehmen wir ein Bild aus dem Artikel
        if (!isset($bilder[$overview_style["thumbs"]][0])) {
            $bilder = get_images_from_article($container, false, false);
        }
        // Wenn auch nein, dann nehmen wir das Defaultbild
        if (isset($bilder[$overview_style["thumbs"]][0])) {
            $teaser_image = $bilder[$overview_style["thumbs"]][0];
        } else {
            $teaser_image = "http://partner.bulthaup.com/assets/img/allgemeine-informationen.jpg";
        }
        atomicdesign::output("molecule", "overview-item", array("content" => $container, "bild" => $teaser_image, "heading" => $heading, "layout_classes" => $layout_classes, "behavior_classes" => $behavior_classes, "display_data" => $display_data));
        ?>
	</div>

	
<?php 
    }
    ?>