Skip to content

Set data to database

robiso edited this page Feb 22, 2018 · 3 revisions

wCMS::set()

  • can be used to save data to database.js

Examples

// Set new website title 
wCMS::set('config', 'siteTitle', 'My website title');
// Set current theme to "default"
wCMS::set('config', 'theme', 'default');

Additional examples

// Set title for "Page-name"
wCMS::set('pages', 'Page-name', 'title', 'Your title here');
// Set content for "Page-name"
wCMS::set('pages', 'Page-name', 'content', 'Page content here');
// Set SEO keywords for "Page-name"
wCMS::set('pages', 'Page-name', 'keywords', 'Page, keywords, here');
// Set SEO description for "Page-name"
wCMS::set('pages', 'Page-name', 'description', 'Page description for search engines.');

Helpful links

Clone this wiki locally