Part 1
- in IDE:
- edit /themes/advanced/index.tpl template
- after <inp2:st_ContentBlock num="1"/> tag add <inp2:st_ContentBlock num="2" mode="inline"/> tag
- save changes
- in Admin Console
- go to Website & Content → Browse Website section
- click on Content Mode button in top frame
- confirm, that 2 content blocks are displayed
- click Edit Content button and confirm, that CKEditor in opened window doesn't have Content Templates toolbar button
- close content block editing window
- click inside dotted area of 2nd content block (that is edited inline) and confirm, that CKEditor, that is shown inline doesn't have Content Templates toolbar button
- click outside dotted area to stop editing
Part 2
- in IDE:
- in each inp_ckconfig.js file (there are 2 of them) uncomment Templates toolbar button in all toolbar configurations
- in Admin Console
- repeat test from Part 1, but this time confirm, that Content Templates toolbar button is present and clicking it opens modal window with 3 templates shown
Part 3
// Register a templates definition set named "default". CKEDITOR.addTemplates('default', { // The name of sub folder which hold the shortcut preview images of the templates. imagesPath: CKEDITOR.getUrl( CKEDITOR.plugins.getPath( 'templates' ) + 'templates/images/' ), // The templates definitions. templates: [ { title: 'Sample Template', image: '', description: 'Sample Template Description', html: '<h3>Sample Template</h3><div>Sample Template Body</div>' } ] });
- in IDE:
- create /themes/advanced/platform/inc/templates.js file with above shown content
- in Admin Console
- repeat test from Part 1, but this time confirm, that Content Templates toolbar button is present and clicking it opens modal window with 1 template from templates.js file created before