Sympal - Symfony CMS Preview

Uploaded on

Early presentation previewing the Sympal CMS.

Early presentation previewing the Sympal CMS.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Extension for symfony geared towards content based web applications. Sympal Introduction
  • 2. The Idea • Sympal was born out of years of building content based web applications using various frameworks and tools in different languages. • The name was born from wanting the functionality Drupal provides but in a good way, like in symfony (Drupal - bad code) + symfony = Sympal Sympal Introduction
  • 3. Multiple Plugins • Core Plugins • sfSympalPlugin • sfSympalMenuPlugin • sfSympalPluginManagerPlugin • sfSympalUserPlugin • sfSympalPagesPlugin • sfFormExtraPlugin • sfTaskExtraPlugin • Addon Plugins • sfSympalBlogPlugin • sfSympalCommentsPlugin • ...More coming soon. Develop a new sympal addon! Sympal Introduction
  • 4. What does it add? • Extra tasks • Extra functions in your base sfActions • Better integrated support for e-mail sending • Easy interactive installation • Addon plugins that can be one click installed • Menus/sitemap, admin bar, editor menu, etc. • Custom content types • Custom content slot types • Lots more tools Sympal Introduction
  • 5. Additional Tasks $ ./symfony list sympal Available tasks for the quot;sympalquot; namespace: :install Install the sympal plugin content management framework. :plugin-download Download a sympal plugin to an existing sympal installation :plugin-generate Generate the skeleton for a sympal plugin :plugin-install Install a sympal plugin to an existing sympal installation :plugin-uninstall Uninstall a sympal plugin to an existing sympal installation Sympal Introduction
  • 6. Generate Sympal Plugin Generate a new Sympal plugin from the command line $ ./symfony sympal:plugin-generate Event --content-type=Event This command will create a new plugin named sfSympalEventPlugin Are you sure you want to proceed? (y/N) sfSympalEventPlugin config/ doctrine/ schema.yml routing.yml sfSympalEventPluginConfiguration.class.php data/ fixtures/ install.yml lib/ Sympal Introduction
  • 7. Install Sympal Plugin Sympal Introduction
  • 8. Default Sympal Plugin Install • Adds new menu item • Adds new content type • Adds sample content record Sympal Introduction
  • 9. Download Sympal Plugin • You can download and install new sympal plugins from the web interface or from the command line Sympal Introduction
  • 10. Install Sympal Blog • One click install a blog • Downloads from svn or pear and runs installation Sympal Introduction
  • 11. Install Sympal Blog Sympal Introduction
  • 12. Add Sympal Comments to Blog • The sfSympalBlogPlugin was built to work with sfSympalCommentsPlugin so all we need to do is install it to add comments to our blog. Sympal Introduction
  • 13. Sympal Events • Events are implemented in Sympal so you can easily custom admin menus, the editor toolbar, etc. – sympal.load_admin_bar – sympal.load_settings – sympal.load_tools Sympal Introduction
  • 14. Sympal Events Hook in to the sympal events so you can customize and add things for your needs class sfSympalSamplePluginConfiguration extends sfPluginConfiguration { public static $dependencies = array( 'sfSympalPlugin' ); public function initialize() { $this->dispatcher->connect('sympal.load_admin_bar', array($this, 'loadAdminBar')); } public function loadAdminBar(sfEvent $event) { $menu = $event['menu']; $administration = $menu->getChild('Administration'); $administration->addChild('New Item', '@new_item_route'); } } Sympal Introduction
  • 15. Sympal Inline Editing • Edit content inline Posted by <?php echo get_sympal_column_content_slot($content, 'created_by', 'render_blog_post_author') ?> on <h2><?php echo get_sympal_column_content_slot($content, 'title') ?></h2> <?php echo get_sympal_column_content_slot($content, 'date_published') ?> Sympal Introduction
  • 16. Sympal Inline Editing • Edit content properties/columns • Edit arbitrary content slots • Select content slots type Sympal Introduction
  • 17. Sympal Rich Text Editing • Easily upload photos to your content • Create rich content with the YUI Rich Text editor Sympal Introduction
  • 18. Sympal Rich Text Editing Sympal Introduction
  • 19. Sympal Content Form • If you don’t want to edit content inline you can always edit from a backend form Sympal Introduction
  • 20. Sympal Content Types • Sympal core only provides one content type and it is a basic CMS page with a title and a body • You can easily add new content types to sympal for your project. i.e. Article, Event, etc. Sympal Introduction
  • 21. Sympal Content Slot Types • Sympal providers four different built in content types. – Text - Single one line input text box – MultiLineText - Multi line input text box – RichText - YUI rich text editor – Markdown - Same as MultiLineText but rendered with Markdown Sympal Introduction
  • 22. Sympal Configuration • Everything in sympal is configurable via web interface or yaml. all: sympal_settings: recaptcha_public_key: 6Ld2DgQAAAAAAApXLteupHPcbSxbSHkhNTuYLChX recaptcha_private_key: 6Ld2DgQAAAAAANIbaXJsFEBOyg56CL_ljy3APlPb language_codes: [en, fr, es] disallow_php_in_content: false default_layout: sympal rows_per_page: 10 I18n: enabled: true ContentSlot: true MenuItem: true sympal_plugin_svn_sources: [quot;;] markdown_styled_boxes: [quote, tip, caution, note] Sympal Introduction
  • 23. Sympal Configuration • Change configuration from sympal in browser Sympal Introduction
  • 24. Sympal Sites • With sympal you can easily manage multiple sites from one installation. • A sympal site is bound to a symfony application require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('sympal', 'prod', false); sfContext::createInstance($configuration)->dispatch(); Sympal Introduction
  • 25. Sympal Breadcrumbs • Since sympal manages your sitemap we can easily generate breadcrumbs from your current position. <?php echo get_sympal_breadcrumbs($menuItem) ?> • Of course if you want to generate breadcrumbs manually you can do so <?php echo get_sympal_breadcrumbs(array( 'Home' => '@homepage', 'About' => '@about', 'Jonathan H. Wage' => null )) ?> Sympal Introduction
  • 26. Sympal Menus • Working with menus in sympal, are...well...simple :) and very efficient Sympal Introduction
  • 27. Sympal Menus • Menus only ever require one query no matter how many menus you have and how many times you call/render them in one page </p> <?php echo get_sympal_menu('footer') ?> </div> <!-- end footer --> Sympal Introduction
  • 28. Sympal Sub-menus • You can easily retrieve a sub menu for a menu item by simply passing it to the get_sympal_menu() method. • In this example we get the sub menu for the current menu item. <?php $subMenu = get_sympal_menu($currentMenuItem) ?> Sympal Introduction
  • 29. Sympal Routing • Multiple urls for content • Specify one url as primary • Change urls without affecting seo and creating 404s • Custom urls for individual content or content types Sympal Introduction
  • 30. Security • Sympal implements your basic security model using users, groups and permissions. • All content and menus can be restricted for certain users, groups, permissions, etc. • Menus can require auth, no auth, etc. Sympal Introduction
  • 31. Sympal E-Mail • You can easily send and manage your application e-mails with sympal. $variables = array( 'forgot_password' => $forgotPassword, 'email_address' => $this->form->user->email_address, 'user' => $this->form->user ); $this->sendEmail('sympal_forgot_password/send_request', $variables); • First argument can be path to partial or component • Second argument is array of variables for e- mail Sympal Introduction
  • 32. Sympal E-Mail • In a sympal e-mail template the subject is the first line and body is everything else. Forgot Password Request for <?php echo $user->getUsername() ?> Hello <?php echo $user->getName() ?>,<br/><br/> This e-mail is being sent because you requested information on how to reset your password.<br/><br/> You can change your password by clicking the below link which is only valid for 24 hours:<br/><br/> <?php echo link_to('Click to change password', '@sympal_forgot_password_change? unique_key='.$forgot_password->unique_key) ?> • This is so the subject and body of your e- mails are managed in one place. Sympal Introduction
  • 33. Sympal Action Confirmations • Often you want to confirm an action in symfony. A delete, or some intense operation. Usually this is only possible client side. Until now! public function executeDelete(sfWebRequest $request) { $this->askConfirmation('Please Confirm', 'Are you sure you wish to delete this record?'); $user = $this->getRoute()->getObject(); $user->delete(); $this->getUser()->setFlash('notice', 'User was deleted successfully!'); $this->redirect('@homepage'); } • Clicking yes will re-send action with confirmation and continue execution. Sympal Introduction
  • 34. New Menu Manager Makes use of YUI tree and menus to manage your menus. Current system is un-finished and uses jQuery. Sympal Introduction
  • 35. More to come • More YUI in the interface • General cleanup and enhancing of interface • Add more Sympal addon plugins • Fix bugs • Create documentation Sympal Introduction