Skip to content

Instantly share code, notes, and snippets.

@notomato
Created August 17, 2012 09:45
Show Gist options
  • Save notomato/3377487 to your computer and use it in GitHub Desktop.
Save notomato/3377487 to your computer and use it in GitHub Desktop.
Adding an ajax media type
<?php
Media::type('ajax', array('text/html'), array(
'view' => 'lithium\template\View',
'paths' => array(
'template' => array(
'{:library}/views/{:controller}/{:template}.ajax.php',
'{:library}/views/{:controller}/{:template}.html.php',
),
'layout' => false,
'element' => array(
'{:library}/views/elements/{:template}.ajax.php',
'{:library}/views/elements/{:template}.html.php'
)
),
'conditions' => array('ajax' => true)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment