Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
fixes #1 - Updated the readme documentation to illustrate different H…
Browse files Browse the repository at this point in the history
…elper uses
  • Loading branch information
real34 committed Jan 4, 2011
1 parent d18c70f commit 6229bdf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,16 @@ To use any parser in your views just include the Parser helper into the $helpers

public $helpers = array('MarkupParsers.Parser');

And in your views
And in your views you can either use `Parser::parse()` to get multipage parsed content:

echo $this->Parser->parse($string, 'my_parser'); // the second parameter can be left blank ad will use 'markdown' as default
$pages = $this->Parser->parse($string);
foreach ($pages as $page) :
echo $this->Html->tag('div', $page, array('class' => 'page'));
endforeach;

Or `Parser::parseAsString()` to get a string with parsed content no matter if it is a multipage text:

echo $this->Parser->parseAsString($string, 'my_parser'); // the second parameter can be left blank ad will use 'markdown' as default


## Requirements ##
Expand Down

0 comments on commit 6229bdf

Please sign in to comment.