-
Notifications
You must be signed in to change notification settings - Fork 1
Markdown Service
hertsch edited this page Apr 14, 2014
·
2 revisions
Markdown is an easy to use Markup Language, which is more and more used for the data exchange - this GitHub Wiki is also written in Markdown.
The TemplateTools Markdown Service provide you with two functions:
The Markdown Service support both, the standard Markdown Syntax and the Markdown Extra Syntax (enabled by default).
Parameter
-
string $text
- Markdown formatted text (input) -
boolean $extra
- optional, default =true
-
boolean $prompt
- optional, default =true
(php
only)
Usage php
<?php $template['markdown']->html('This is a **Markdown** text.'); ?>
Usage twig
(as Filter)
{{ 'This is a **Markdown** text.'|markdown }}
or Usage twig
(as Function)
{{ markdown('This is a **Markdown** text.') }}
This will output the following HTML code:
<p>This is a <strong>Markdown</strong> text.</p>
Parameter
-
string $path
- full path to a Markdown formatted file -
boolean $extra
- optional, default =true
-
boolean $prompt
- optional, default =true
(php
only)
Usage php
<?php $template['markdown']->file(MANUFAKTUR_PATH.'/TemplateTools/README.md'); ?>
Usage twig
{{ markdown_file(MANUFAKTUR_PATH ~ '/TemplateTools/README.md') }}
This will output the README.md file of the TemplateTools HTML formatted.
- If you spot a typo or want to contribute an article, a how-to or a tip, feel free to edit the Wiki directly
- If you you have any questions, please visit the phpManufaktur Support Forum
This Documentation is part of the kitFramework Project
© 2014 by phpManufaktur, kitFramework and TemplateTools are published under MIT license.