Panel · Mecha CMS

Panel’s API.

URL Structure

Author: Taufik Nurrohman · 313 Views

Tweet

Common URL pattern used by this extension.

Table of Content

Path 

<$url>/<$slug>/::<$command>::/<$directory>/<$path>
  • $url → the base URL
  • $slug → the path value as defined in lot\extend\panel\lot\state\config.php
  • $command → in general, it can be s, g or r (info)
  • $directory → the base folder name relative to LOT
  • $path → any path that maps to the file/folder in $directory

Examples:

http://mecha-cms.com/panel/::s::/asset/css → create a file in `lot\asset\css`
http://mecha-cms.com/panel/::g::/asset/css/a.css → edit `a.css` file that is stored in `lot\asset\css` folder
http://mecha-cms.com/panel/::r::/asset/css/a.css → delete `a.css` file that is stored in `lot\asset\css` folder

Query 

NameDescription
fBase query to set pre-defined value in a form element by its name.
f[title]Set pre-defined value in a form element with name title.
layoutDefine the panel’s layout option: 0, 1, 2, or 3.
m[t:v]Base query to activate a tab in the main section by its name.
viewDefine the layout view: file, or page (default to file).

Examples:

http://mecha-cms.com/panel/::s::/page?f[title]=Page%20Title&f[content]=Page%20content.
http://mecha-cms.com/panel/::g::/page?view=file
http://mecha-cms.com/panel/::g::/page?m[t:v]=css
http://mecha-cms.com/panel/::g::/asset?layout=0