Skip to content

A plugin to output the page content or data as raw, html, json or xml in Pico CMS.

License

Notifications You must be signed in to change notification settings

nliautaud/pico-output

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pico Output

Output Pico CMS page data as raw text, html, json or xml with ?output.

Installation

Copy PicoOutput.php to the plugins/ directory of your Pico Project.

Usage

Configure the plugin and enable outputs formats in the Pico config file (for site-wide settings) or in the page metadata.

PicoOutput:
    formats: [content, raw, prepared, json, xml]

Then add ?output=format to a page url.

format desc. example
content The html content. <p>Some content. <emph>base_url</emph>: http://monsite.com</p>
raw The raw page, with meta header and raw variables. ---\nTitle:My title\n---\nSome content. *base_url*: %base_url%
prepared The page content without the meta header and with parsed variables. Some content. *base_url*: http://monsite.com
json The page data in json format. {"id":"index","url":"http:\/\/monsite.com\/index","title":"My title","author":"","time":"","date":"","date_formatted":"","raw_content":"---\nTitle:My title\n---\nSome content. *base_url*: %base_url%","content":"<p>Some content. <emph>base_url</emph>: http://monsite.com</p>"}
xml The page data in xml format. <page><id>index</id><url>http://monsite.com/index</url><title>My title</title><author/><time/><date/><date_formatted/><raw_content>---\nTitle:My title\n---\nSome content. *base_url*: %base_url%</raw_content><content><p>Some content. <emph>base_url</emph>: http://monsite.com</p></content></page>"}

Note that some formats output the page meta or basic internal data.

About

A plugin to output the page content or data as raw, html, json or xml in Pico CMS.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages