Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
PHamlP Integration?
  • I haven't been able to wrap my head around SimpleTags yet. I got the parser package installed just fine. Were you able to get working with SimpleTags? Example would be awesome. If you do get jade in, I'll definitely buy you a beer.
  • Parser config :
    ...
    'View_SimpleTags' => array(
         'include' => PKGPATH . 'parser' . DS . 'vendor' . DS . 'simpletags.php',
         'delimiters' => array('<<', '>>'),
         'trigger' => 'tag:',
    ),
    ...
    

    Controller :
    $view = View::factory('test.stags');
    
    $view->variable = 'Whooooaaaa';
    $this->response->body = $view;
    

    View (test.stags):
    <div class="content">
    
      <h3> <<tag:variable>> </h3>
    
    </div>
    

    I never looked into Jade ... I have to inform on this template engine
  • Ah, got ya. Thanks for the example = ) The cool thing about jade is it totally changes the way you write HTML, and it's a lot simpler than HAML. For example: body header footer
    Would output: <body>
    <header></header>
    <footer></footer>
    </body> 60% fewer characters you must type! I've used Jade with Node.js. So you wouldn't be parsing variables as with SimpleTags, you're parsing text and turning it into HTML, using tabs as your rules for nesting.
  • SimpleTags only works for strings, yea?
  • I noticed this problem ( SimpleTags loop ) too ...
    Please open an Issue on GitHub ( https://github.com/fuel/parser/issues ) ... and after that download the last version on parser package ( I've commited 15 minutes ago ) :-)
  • Submitted. Thanks for your work on this!
  • Davide Bellini wrote on Saturday 18th of June 2011:
    If your code works, please make a "Pull Request" from Github ... so Jelmer can check and merge your code into the official package.

    ...and done.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion