Exemple #1
0
    ?>
 <?php 
    // will also insert its slot-specific controls via a separate
    ?>
 <?php 
    // a-slot-controls-$pageid-$name-$permid slot that the slot implementation
    ?>
 <?php 
    // provides for us
    ?>

 <?php 
    slot("a-slot-content-{$pageid}-{$name}-{$permid}");
    ?>
   <?php 
    a_slot_body($name, $slot->type, $permid, array_merge(array('edit' => $editable, 'preview' => $preview), $slotOptions), array(), $slot->isOpen());
    ?>
 <?php 
    end_slot();
    ?>

 <?php 
    // Wraps an individual slot, with its controls
    ?>
	<div class="a-slot <?php 
    echo $slot->getEffectiveVariant($slotOptions);
    ?>
 <?php 
    echo $slot->type;
    ?>
 <?php 
Exemple #2
0
$name = isset($name) ? $sf_data->getRaw('name') : null;
$options = isset($options) ? $sf_data->getRaw('options') : null;
$pageid = isset($pageid) ? $sf_data->getRaw('pageid') : null;
$permid = isset($permid) ? $sf_data->getRaw('permid') : null;
$type = isset($type) ? $sf_data->getRaw('type') : null;
$validationData = isset($validationData) ? $sf_data->getRaw('validationData') : null;
$variant = isset($variant) ? $sf_data->getRaw('variant') : null;
$slot = isset($slot) ? $sf_data->getRaw('slot') : null;
// 1.3 and up don't do this automatically (no common filter)
// Note that you cannot add more JS and CSS files in an ajax slot update. You are
// expected to load those with the page. This avoids a lot of chicken and egg problems
// with double-loading of CSS and JS files. Prior to this commit there was code here to
// include CSS and JS, however it didn't work anyway - that code was run before a_slot_body and
// therefore never had anything to add
use_helper('a');
a_slot_body($name, $type, $permid, $options, $validationData, $editorOpen, true);
if (!$slot->isNew()) {
    ?>
  <?php 
    a_js_call('apostrophe.slotNotNew(?, ?, ?)', $pageid, $name, $permid);
}
a_js_call('apostrophe.areaUpdateMoveButtons(?, ?, ?)', url_for('a/moveSlot'), $pageid, $name);
?>

<?php 
if (isset($variant)) {
    ?>
  <?php 
    a_js_call('apostrophe.slotHideVariantsMenu(?)', "#a-{$pageid}-{$name}-{$permid}-variant ul.a-variant-options");
}
?>