Beispiel #1
0
 public static function embed($name, $settings = array())
 {
     $content = self::loadCMS($name);
     $content = !empty($content) ? $content['content'] : (!empty($settings['default']) ? $settings : '');
     if (ClientUser::getInstance()->isAdmin()) {
         JS::set('token', Session::getInstance()->getToken());
         return '<a href="javascript:lightning.cms.edit(\'cms_' . $name . '\')" class="button" id="cms_edit_' . $name . '">Edit</a>' . '<a href="javascript:lightning.cms.save(\'cms_' . $name . '\')" class="button hide" id="cms_save_' . $name . '">Save</a>' . CKEditor::editableDiv('cms_' . $name, array('spellcheck' => true, 'content' => $content, 'finder' => true, 'edit_border' => !empty($settings['edit_border'])));
     } else {
         return '<div>' . $content . '</div>';
     }
 }
Beispiel #2
0
?>
" /></td></tr>
                    <tr><td>Description:</td><td><input type="text" name="description" id='page_description' value="<?php 
echo $full_page['description'];
?>
" /></td></tr>
                    <tr><td>Keywords:</td><td><input type="text" name="keywords" id='page_keywords' value="<?php 
echo $full_page['keywords'];
?>
" /></td></tr>
                    <tr><td>Include in site map:</td><td><input type="checkbox" name="sitemap" id='page_sitemap' value="1" <? if ( $full_page['site_map'] == 1):?>checked="true"<? endif; ?> /></td></tr>
                    <tr><td>Hide Side Bar:</td><td><?php 
echo Page::layoutOptions($full_page['layout']);
?>
</td></tr>
                </table>
            </div>
        <? endif; ?>
        <?php 
echo \Lightning\Tools\CKEditor::editableDiv('page_display', array('spellcheck' => true, 'content' => $full_page['body'], 'finder' => true));
?>
        <? if ($editable):?>
            <input type="button" name="submit" class='button page_edit' onclick="lightning.page.save();" value="Save" <? if (empty($action) || $action != 'new'):?>style="display:none;"<? endif; ?> /><br />
        <? endif; ?>

        <?php 
echo $this->build('social_links');
?>
    </div>
</div>