Skip to content

Instantly share code, notes, and snippets.

@rapzo
Forked from nateabele/media.php
Created March 19, 2012 19:13
Show Gist options
  • Select an option

  • Save rapzo/2124746 to your computer and use it in GitHub Desktop.

Select an option

Save rapzo/2124746 to your computer and use it in GitHub Desktop.

Revisions

  1. @nateabele nateabele revised this gist Feb 17, 2012. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions media.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    <?php

    use lithium\net\http\Media;

    /**
    * This re-maps your template paths so you can have stuff like `pages/users_{username}.php`
    * instead of the Lithium default.
    @@ -17,3 +21,4 @@
    )
    ));

    ?>
  2. @nateabele nateabele created this gist Feb 17, 2012.
    19 changes: 19 additions & 0 deletions media.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    /**
    * This re-maps your template paths so you can have stuff like `pages/users_{username}.php`
    * instead of the Lithium default.
    */
    Media::type('html', 'text/html', array(
    'view' => 'lithium\template\View',
    'processes' => array(
    'all' => array('template'),
    'fragment' => array('fragment')
    ),
    'steps' => array(
    'fragment' => array('path' => 'fragment')
    ),
    'paths' => array(
    'template' => LITHIUM_APP_PATH . '/views/pages/{:page}.php',
    'fragment' => LITHIUM_APP_PATH . '/views/fragments/{:template}.inc'
    )
    ));