Format Plugin
The format plugin allows you to format content with a specific processor, such as Markdown or Textile.
format:markdown
{{ format:markdown }}Let's _convert_ this to **HTML**.{{ /format:markdown }}
Sends your content through the Markdown processor.
Example
Markdown formatting
{{ format:markdown }}
_Format_ allows you to send your content through the **Markdown** processor.
Find out more about **Markdown** formatting on their website <http://daringfireball.net/projects/markdown/syntax>
{{ /format:markdown }}
Returns:
<p><em>Format</em> allows you to send your content through the <strong>Markdown</strong> processor.</p>
<p>Find out more about <strong>Markdown</strong> formatting on their website <a href="http://daringfireball.net/projects/markdown/syntax">http://daringfireball.net/projects/markdown/syntax</a></p>
format:textile
{{ format:textile }}Let's _convert_ this to *HTML*.{{ /format:textile }}
Sends your content through the Textile processor.
Example
Textile formatting
{{ format:textile }}
_Format_ allows you to send your content through the *Textile* processor.
Find out more about *Textile* formatting on their website "http://www.textism.com/tools/textile/":http://www.textism.com/tools/textile/
{{ /format:textile }}
Returns:
<p><em>Format</em> allows you to send your content through the <strong>Textile</strong> processor.</p>
<p>Find out more about <strong>Textile</strong> formatting on their website <a href="http://www.textism.com/tools/textile/">http://www.textism.com/tools/textile/</a></p>
format:url_title
{{ format:url_title string="Some Long Post Title" separator="-" lowercase="true" }}
A shortcut to the CodeIgniter URL Helper url_title($string, $separator, $lowercase) function.
Attributes
| Name | Default | Required | Description |
|---|---|---|---|
| string | Yes | The string to process | |
| separator | dash | No | Replace spaces or other special characters with this. |
| lowercase | false | No | Do you want to convert it to lowercase as well? |
Important: The params have to be in the correct order for this function to work. This function will act like the {{ helper:function }} methods.
Example
Title to URL Safe conversion
{{ format:url_title string="Some Long Post Title" separator="-" lowercase="true" }}
Returns:
"some-long-post-title"
