Download
Last stable v 5.2 2024-11-01
API URL | /mnu/put |
Description | Create new or update CMS menu item info RESTFul API |
Access | Restricted to roles: admin, demo (r/o) |
Rquest method | POST |
Request data type | Request raw data |
Request data |
{
id: 'menu id in DB table', // ex. '1' (applicable if update)
folder: '', // '1' - menu item is folder
seq: "XXXXXXX", // unique SEQ
doc_id: 'assigned to menu page id in DB table', // ex. '1' (applicable if page is assigned to menu item)
dir_id: 'parent menu id in DB table', // applicable when create new menu item
dir_type: '2', // 1 - language, 2 - menu
lng_id: 'language id in DB table', // ex. '1'
title: 'menu title', // ex. 'Samples'
title_doc: 'page title', // ex. 'Samples'
title_full: 'page extended title', // ex. 'All samples related to something'
desc: 'page description',
keyw: 'page keywords',
lang: 'page language id' // ex 'en'
name: 'menu name', //ex. 'Samples'
class: 'menu item class name', // class to be assigned to <li> item in menu list
class_list: 'menu list class name', // class to be assigned to <ul> item in menu list
url: 'menu URL', // ex. '/samples'
url_target: 'a href tag target', // ex. '_blank'
active: '0', // 1 - will assign class 'surrent' by default
default: '0', // 1 - mnu template plugin will select as default in starting not from begining
path: '1', // 1 - include in template pth plugin
public: '1', // 1 - page public available, 0 - no public available
public_start: '0000-00-00 00:00:00', // when page public availability starts (if public=1)
public_stop: '9999-00-00 00:00:00', // when page public availability stops (if public=1)
access_changed: '1', // 1 - access data was changed, 0 - access data remains unchanged
access: { // access control data
i: '1', // 1 - inheritance is alowed, 0 - inheritance is not alowed
r: { // read permission - actual only in Pages tool
g: ['group code', ...], // group/role permissions, ex. ['admin','demo']
u: ['user id', ...] // user permissions, ex. ['jsmi']
},
w: { // write permission - actual only in Pages tool
g: ['group code', ...],
u: ['user id', ...]
},
e:{ // execute permission - controls permission for page execution in browser
g: ['group code', ...],
u: ['user id', ...]
},
m:{ // manage permission - actual only in Pages tool
g: ['group code', ...],
u: ['user id', ...]
},
rep: '1' // 1 - replace access control data in all child nodes, 0 - do not replace
},
manage: '1' - current user has permissions to change access control data
}
|
Response type | JSON |
Response data |
{
rc: 'return code', // '0' - success, '1' - error
msg: 'return message', // error message
data:[
key: 'page id in DB table', // ex. '1'
filter: 'language id in DB table', // ex. '1'
type: '2', // 2 - menu item
title: 'page title', // ex. 'demo'
url: 'page url', // ex. '/demo'
tooltip: 'text about menu item'
editor: 'last update editor name', // ex. 'Linkoln Edgar', '0' - if cms builtin administrator
timestamp: 'last update timestamp' // ex. '2013-09-02 15:04:33'
]
}
|