Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes #1 - Updated the readme documentation to illustrate different H…

…elper uses
  • Loading branch information...
commit 6229bdffe22b82b44649b369d305697abee5ac4e 1 parent d18c70f
@real34 real34 authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 readme.md
View
11 readme.md
@@ -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 ##
Please sign in to comment.
Something went wrong with that request. Please try again.