Skip to content

Instantly share code, notes, and snippets.

@jbroadway
Created June 25, 2013 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbroadway/5860050 to your computer and use it in GitHub Desktop.
Save jbroadway/5860050 to your computer and use it in GitHub Desktop.
An example of a simple handler that's listed in Elefant's Dynamic Objects menu.
; <?php /* apps/myapp/conf/embed.php
[myapp/myhandler]
label = "MyApp: My Handler"
; */ ?>
<!-- apps/myapp/views/myhandler.html -->
{% if User::is_valid () %}
Hello {{user.name}}!
{% else %}
Not logged in.
{% end %}
<?php // apps/myapp/handlers/myhandler.php
echo $tpl->render ('myapp/myhandler');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment