Esempio n. 1
0
    function section_template()
    {
        $section_output = !$this->active_loading ? render_nested_sections($this->meta['content'], 1) : '';
        $style = '';
        $inner_style = '';
        // Use alt mode for this
        $title = $this->opt('pl_standard_title') ? sprintf('<h2 class="pl-section-title pla-from-top subtle pl-animation">%s</h2>', $this->opt('pl_standard_title')) : '';
        $inner_style .= $this->opt('pl_area_height') ? sprintf('min-height: %spx;', $this->opt('pl_area_height')) : '';
        $inner_classes = 'pl-inner area-region pl-sortable-area editor-row';
        $classes = '';
        // If there is no output, there should be no padding or else the empty area will have height.
        if ($section_output || $title != '') {
            // global
            $default_padding = pl_setting('section_area_default_pad', array('default' => '20'));
            // opt
            $padding = rtrim($this->opt('pl_area_pad', array('default' => $default_padding)), 'px');
            $padding_bottom = rtrim($this->opt('pl_area_pad_bottom', array('default' => $padding)), 'px');
            $style .= sprintf('padding-top: %spx; padding-bottom: %spx;', $padding, $padding_bottom);
            $content_class = $padding ? 'nested-section-area' : '';
            $buffer = pl_draft_mode() ? sprintf('<div class="pl-sortable pl-sortable-buffer span12 offset0"></div>') : '';
            $section_output = $buffer . $section_output . $buffer;
        } else {
            $pad_css = '';
            $content_class = '';
        }
        ?>
	<div class="pl-area-wrap <?php 
        echo $classes;
        ?>
" style="<?php 
        echo $style;
        ?>
">

		<div class="pl-content <?php 
        echo $content_class;
        ?>
">
			<?php 
        echo $title;
        ?>
			<div class="<?php 
        echo apply_filters('pl-area-inner-classes', $inner_classes, $this->meta);
        ?>
" style="<?php 
        echo apply_filters('pl-area-inner-style', $inner_style, $this->meta);
        ?>
">
				<?php 
        echo $section_output;
        ?>
			</div>
		</div>
	</div>
	<?php 
    }
Esempio n. 2
0
    function section_template()
    {
        $boxed_class = $this->opt('boxed_columns') ? 'column-boxed pl-border' : '';
        ?>
		<div class="pl-sortable-column pl-sortable-area editor-row <?php 
        echo $boxed_class;
        ?>
">

			<?php 
        echo render_nested_sections($this->meta['content'], 2);
        ?>
			<span class="pl-column-forcer">&nbsp;</span>
		</div>
	<?php 
    }