SlideShare a Scribd company logo
1 of 33
Download to read offline
Extend your ContentBox Apps with custom
modules and build dynamic pages
LED BY
Javier Quintero
SESSION
JAVIER QUINTERO
SPEAKER AT ITB2023
• Systems Engineer
• Colombian => Living in Houston, Texas
• Java and CFML Developer
• Currently working for Ortus Solutions
• DJ and tennis instructor when not coding
AGENDA
• Introduction
• ContentBox Look & Feel
• Themes
• Global HTML
• Widgets
• Modules
• Front end Development
• File structure
• JS and CSS Assets
• Theme Development
• Back end Development
• How to build a custom module
• DEMO
Introduction
ContentBox is a professional open source hybrid modular CMS (Content
Management System) that allows you to easily build websites, blogs,
wikis, complex web applications and even power mobile or cloud
applications.
Built with a secure and flexible modular core, designed to scale, and
combined with world-class support, ContentBox will get your projects out
the door in no time.Built with a secure and flexible modular core,
designed to scale, and combined with world-class support, ContentBox
will get your projects out the door in no time.
Active Theme
• Header
• Footer
• Contact
• Blog Options
On this section, you will be able to customize your current theme and your theme settings
ContentBox Look & Feel
Global HTML
• Global Layout
• Before Head End
• After Body Start
• Before Body End
• Before Any
Content
• After Any Content
• Before SideBar
• After SideBar
• After Footer
The Global HTML allows you to render HTML/CSS/JavaScript in many different locations within the life-
cycle of the rendered content in the UI.
ContentBox Look & Feel
• Blog Entries
• Before A Blog Entry
• After A Blog Entry
• Before Blog Index
• After Blog Index
• Before Blog Archives
• After Blog Archives
• Comments
• Before The
Comment Form
• After The
Comment Form
• Pages
• Before Any Page
• After Any Page
Themes
By default ContentBox provides a default theme, but there are more themes available for you to use
ContentBox Look & Feel
• Ortus themes
• Developed and maintained by the Ortus team
• Community themes
• Built by the community and shared on ForgeBox
• Custom themes
• Built by yourself to fulfill your own taste and needs
• Publish it on ForgeBox so others can use it :)
Widgets
Widgets are small pieces of software that you can add to your ContentBox website to perform a specific
function. There are several Widgets built into ContentBox that are used for various parts of your website,
and you can insert widgets into blog posts and pages to make your website even more dynamic.
ContentBox Look & Feel
• Ortus widgets
• Developed and maintained by the Ortus team
• Community widgets
• Built by the community and shared on ForgeBox
• Custom widgets
• Built by yourself to fulfill your own needs
• Publish it on ForgeBox so others can use it :)
ContentBox Modules
Modules are self contained bundles of code, that contain their own configuration, routes, handlers, views,
widgets, interceptors, and can contain other modules. They are a vital part of ContentBox, and the ease in
which you can use, and develop for ContentBox.
• Ortus Modules
• Developed and maintained by the Ortus team
• Community Modules
• Built by the community and shared on ForgeBox.io
• Custom Modules
• Built by yourself to fulfill your own needs
• Publish it on ForgeBox so others can use it :)
Built on Modules
ContentBox itself is made up of 4 separate Modules ( and their submodules ), ContentBox, ContentBox-
Admin, ContentBox-UI and ContentBox-API. One of the best security features of ContentBox is the fact
that you can remove the Admin module from your production installs, removing the ability for the admin to
get hacked, because it is not even present on your production server.
• File Structure
ContentBox Modules
Installing Modules
Modules on ContentBox can easily be installed via CommandBox. Just look for the module you want to
install on ForgeBox and install it.
box install cbSocialite
ContentBox Modules
Managing Modules
Modules can be activated/deactivated at any time which gives you the ability to restrict access to a specific
module if desired.
When working on custom modules, you will be able to scan the modules_app directory for the new
modules to show up and activate them whenever you want
ContentBox Modules
Developing For ContentBox
ContentBox's modular architecture, combined with the awesome power of the ColdBox MVC development
framework, allows for a familiar, yet unrestricted, platform from which to develop great web applications.
ContentBox is comprised of four modules
• contentbox - Includes the the underlying libraries for content organization and
presentation
• contentbox-admin - Provides the administrative interface for managing your
CMS
• contentbox-ui - Provides shared libraries for the user interface which are used
for presentation and which may be extended to your application requirements.
• contentbox-api - Provides a fully documented API to power any external app
easily and consume content anywhere
Front End Development
In developing your user interface, the majority of your time will be spent creating content in the admin and
modifying files from within your custom theme, located in the modules_app/contentbox-custom/_themes
directory.
With state-of-the art development tools like CommandBox to assist with scaffolding and dependency
management and Coldbox Elixir, it's easy to build out your theme in a fraction of the time it might
otherwise take.
File Structure
All the custom frontend work will be done within the modules_app/contentbox-custom folder
Front End Development
• _content ( Location for the custom media )
• _modules ( All the custom modules will go here )
• _themes ( Custom Themes, built by the developer and not
installed via ForgeBox )
• _widgets ( custom widgets - built by the developer and not
installed via ForgeBox )
Javascript
You have two options for working with Javascript in the admin.
jsAppendList
This expects the name of the js file ( without the .js extension ) which is located in the ContentBox includes/
js folder. This is a simple convention based approach, so you can easily just append a file, for example
arrayAppend( jsAppendList, 'dragula' ) to load /includes/js/dragula.js
jsFullAppendList
This expects the full path of the js file ( including the .js extension ), including the location. This is useful,
because you may be using grunt or gulp to compile files, store them in different locations, or actually link
out to a CDN for some of your scripts.
For example:
arrayAppend( jsFullAppendList, '/includes/js/dragula.js' );
arrayAppend( jsFullAppendList, 'https://code.jquery.com/jquery-3.1.1.min.js' );
Front End Development
Javascript
How the JS is output
Inside of /modules/contentbox-admin/layouts/inc/HTMLBodyEnd.cfm you will see the following code.
<cfloop list="#event.getValue( "jsAppendList", "", true )#" index="js">
<script src="#prc.cbroot#/includes/js/#js#.js"></script>
</cfloop>
<cfloop list="#event.getValue( "jsFullAppendList", "", true )#" index="js">
<script src="#js#"></script>
</cfloop>
Front End Development
CSS Assets
You have two options for working with CSS in the admin.
cssAppendList
This expects the name of the CSS file ( without the .css extension ) which is located in the ContentBox
includes/css folder. This is a simple convention based approach, so you can easily just append a file, for
example
arrayAppend( cssAppendList, 'dragula' ) to load /includes/css/dragula.css
cssFullAppendList
This expects the full path of the css file ( including the .css extension ), including the location. This is
useful, because you may be using grunt or gulp to compile files, store them in different locations, or
actually link out to a CDN for some of your scripts.
For example
arrayAppend( cssFullAppendList, '/includes/css/dragula.css' );
arrayAppend( cssFullAppendList, 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/
bootstrap.min.css' );
Front End Development
CSS Assets
How the CSS is output
Inside of /modules/contentbox-admin/layouts/inc/HTMLHead.cfm you will see the following code.
<cfloop list="#event.getValue( "cssAppendList", "", true )#" index="css">
<cfset addAsset( "#prc.cbroot#/includes/css/#css#.css" )>
</cfloop>
<cfloop list="#event.getValue( "cssFullAppendList", "", true )#" index="css">
<cfset addAsset( "#css#" )>
</cfloop>
Front End Development
Theme Development
A theme plays an important role when when customizing a site.These are the pieces that make part of a
theme, you can always follow the default theme as reference when building yours.
• Theme.cfc (The CFC that models and configures your theme implementation)
• layouts (The folder that contains layouts in your theme)
• blog.cfm (Mandatory layout used for all blog views by convention)
• pages.cfm (Mandatory layout used for all pages by convention)
• maintenance.cfm (Optional used when in maintenance mode, else defaults to pages)
• search.cfm (Optional used when doing searches, else defaults to pages)
• views (The folder that contains views for rendering)
• archives.cfm (MANDATORY: The view used to render out blog archives.)
• entry.cfm (MANDATORY: The view used to render out a single blog entry with comments, etc.)
• error.cfm (MANDATORY: The view used to display errors when they ocurr in your blog or pages)
• index.cfm (MANDATORY: The view used to render out the home page where all blog entries are
rendered)
• notfound.cfm (The view used to display messages to users when a blog entry requested was not found in
our system.)
• page.cfm (MANDATORY: The view used to render out individual pages.)
Front End Development
Theme Development
For more details on how to build a custom theme check out the official ContentBox docs
https://contentbox.ortusbooks.com/font-end-development/theme-development
Front End Development
Back End Development
ContentBox allows to to extend the core to take care of those special needs and custom business logic you
need to take care of.
You can override some the ContentBox settings in two ways:
1. via ColdBox.cfc
This will allow developers to override any runtime setting for any site.
All you need to do is create a contentbox structure in your configure() or any tier method, with the name of
the site (default is the default site) and then any setting name-value pair.
ContentBox Settings
2. Override ContentBox Settings via Java Environment Variables
You can also override any runtime ContentBox setting by passing them via Docker/Java Runtime variables.
Since these are string keys we can now use our fancy structures like the settings above, so you must
adhere to our recognition pattern:
contentbox_{site}_{setting}=value
Here is an example on adding a custom media root:
-Dcontentbox_default_cb_media_directoryRoot=./build/docker/contentbox/content
This will allow especially Docker environments to override settings as environments or even provide
secrets. More is coming, so stay tuned to our updates.
Back End Development
Module Locations and Conventions
Modules with ContentBox and ColdBox is fairly straightforward. You work with conventions, but you have
control.
Depending on the type of module, there are different methods and locations to install the module into.
• /modules - ColdBox Modules - git ignored, controlled by CommandBox
• /modules_app - ColdBox App Modules - Your application global modules - included in your git repo
• /modules/contentbox/modules - ContentBox Always Load Modules
• /modules/contentbox/modules_user - ContentBox Admin Managed Modules
Back End Development
Build a Module
If you are planning to build a module, a great way to get started is Scaffolding a Module using
CommandBox.
> coldbox create module
The params for this command are the following:
required name (Name of the module to create.)
author = "" (Whoever wrote this module)
authorURL = "" (The author's URL)
description = "" (The description for this module)
version = "1.0.0" (The semantic version number: major.minior.patch)
cfmapping (A CF app mapping to create that points to the root of this module)
modelNamespace (The namespace to use when mapping the models in this module)
dependencies = "" (The list of dependencies for this module)
directory = "modules_app" (The base directory to create your model in and creates the directory if it does
not exist.)
boolean views = "true" (Create the views folder on creatin or remove it. Defaults to true)
Back End Development
Module File Structure
The command creates a ModuleConfig file with all your information. It creates a default handler, called
Home.cfc in the handlers folder. It creates a models folder, with just a placeholder file. It also creates a
views folder, with the home folder to match the handler, and creates a default index.cfm view.
Back End Development
ModuleConfig.cfc
This is the config file that ColdBox loads to setup the module, and get it ready to use. It can setup a lot of
things, including the mapping, entry point, and a lot more.
Back End Development
Build an Admin Module
ContentBox makes it easy to create your own Admin Modules, add Menu Items into the Admin Interface,
use ContentBox Admin Users and Permissions instead of building your own security by extending
ContentBox.
When you are building admin modules, you need to build / install those modules into the modules_app/
contentbox-custom/_modules folder.
Why build a normal website the hard way when ContentBox already has all the login, password reset,
security roles and permissions build for you? You can simply use the admin and add more buttons for your
admin modules.
Back End Development
Admin Menus
Add Menu Items for your Admin Modules into the Admin Interface
You need to update the onLoad and onUnload functions of your ModuleConfig.cfc file.
Back End Development
Adding Meta to your Modules
One common issue with using the theme for your module is the way Meta Tags are generated. Having your
own module, its hard to set your Title, Keywords and Description.
You are able to do this inside your Module Handler Events
Back End Development
DEMO
THANK YOU
Thanks to our sponsors
Thanks to our sponsors

More Related Content

Similar to Extend ContentBox Apps with Custom Modules

Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)Gerke Max Preussner
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 
Know the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkKnow the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkOmkarsoft Bangalore
 
Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2Shyamala Prayaga
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--devaltsav
 
Atlassian Confluence: как сделать работу комфортной
Atlassian Confluence: как сделать работу комфортнойAtlassian Confluence: как сделать работу комфортной
Atlassian Confluence: как сделать работу комфортнойAndrew Fadeev
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
Alfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI DevelopmentAlfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI DevelopmentNicole Szigeti
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationMelanie Archer
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond bloggingJulien Minguely
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkSandeep Adwankar
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesAlfresco Software
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixPeter Nazarov
 
Rapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressRapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressNathaniel Taintor
 
Dojo javascript toolkit
Dojo javascript toolkit Dojo javascript toolkit
Dojo javascript toolkit Predhin Sapru
 
Gutenberg (WidgiLabs Training Sessions)
Gutenberg  (WidgiLabs Training Sessions)Gutenberg  (WidgiLabs Training Sessions)
Gutenberg (WidgiLabs Training Sessions)Nuno Morgadinho
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 

Similar to Extend ContentBox Apps with Custom Modules (20)

Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
Know the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css frameworkKnow the reason behind choosing bootstrap as css framework
Know the reason behind choosing bootstrap as css framework
 
Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2Adobe Flex - Developing Rich Internet Application Workshop Day 2
Adobe Flex - Developing Rich Internet Application Workshop Day 2
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--dev
 
Atlassian Confluence: как сделать работу комфортной
Atlassian Confluence: как сделать работу комфортнойAtlassian Confluence: как сделать работу комфортной
Atlassian Confluence: как сделать работу комфортной
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
Alfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI DevelopmentAlfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI Development
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and Framework
 
BP-9 Share Customization Best Practices
BP-9 Share Customization Best PracticesBP-9 Share Customization Best Practices
BP-9 Share Customization Best Practices
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
Rapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressRapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPress
 
Dojo javascript toolkit
Dojo javascript toolkit Dojo javascript toolkit
Dojo javascript toolkit
 
Gutenberg (WidgiLabs Training Sessions)
Gutenberg  (WidgiLabs Training Sessions)Gutenberg  (WidgiLabs Training Sessions)
Gutenberg (WidgiLabs Training Sessions)
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 

More from Ortus Solutions, Corp

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfOrtus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfOrtus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfOrtus Solutions, Corp
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfOrtus Solutions, Corp
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfOrtus Solutions, Corp
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfOrtus Solutions, Corp
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfOrtus Solutions, Corp
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 

More from Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 

Recently uploaded

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 

Recently uploaded (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 

Extend ContentBox Apps with Custom Modules

  • 1. Extend your ContentBox Apps with custom modules and build dynamic pages LED BY Javier Quintero SESSION
  • 2. JAVIER QUINTERO SPEAKER AT ITB2023 • Systems Engineer • Colombian => Living in Houston, Texas • Java and CFML Developer • Currently working for Ortus Solutions • DJ and tennis instructor when not coding
  • 3. AGENDA • Introduction • ContentBox Look & Feel • Themes • Global HTML • Widgets • Modules • Front end Development • File structure • JS and CSS Assets • Theme Development • Back end Development • How to build a custom module • DEMO
  • 4. Introduction ContentBox is a professional open source hybrid modular CMS (Content Management System) that allows you to easily build websites, blogs, wikis, complex web applications and even power mobile or cloud applications. Built with a secure and flexible modular core, designed to scale, and combined with world-class support, ContentBox will get your projects out the door in no time.Built with a secure and flexible modular core, designed to scale, and combined with world-class support, ContentBox will get your projects out the door in no time.
  • 5. Active Theme • Header • Footer • Contact • Blog Options On this section, you will be able to customize your current theme and your theme settings ContentBox Look & Feel
  • 6. Global HTML • Global Layout • Before Head End • After Body Start • Before Body End • Before Any Content • After Any Content • Before SideBar • After SideBar • After Footer The Global HTML allows you to render HTML/CSS/JavaScript in many different locations within the life- cycle of the rendered content in the UI. ContentBox Look & Feel • Blog Entries • Before A Blog Entry • After A Blog Entry • Before Blog Index • After Blog Index • Before Blog Archives • After Blog Archives • Comments • Before The Comment Form • After The Comment Form • Pages • Before Any Page • After Any Page
  • 7. Themes By default ContentBox provides a default theme, but there are more themes available for you to use ContentBox Look & Feel • Ortus themes • Developed and maintained by the Ortus team • Community themes • Built by the community and shared on ForgeBox • Custom themes • Built by yourself to fulfill your own taste and needs • Publish it on ForgeBox so others can use it :)
  • 8. Widgets Widgets are small pieces of software that you can add to your ContentBox website to perform a specific function. There are several Widgets built into ContentBox that are used for various parts of your website, and you can insert widgets into blog posts and pages to make your website even more dynamic. ContentBox Look & Feel • Ortus widgets • Developed and maintained by the Ortus team • Community widgets • Built by the community and shared on ForgeBox • Custom widgets • Built by yourself to fulfill your own needs • Publish it on ForgeBox so others can use it :)
  • 9. ContentBox Modules Modules are self contained bundles of code, that contain their own configuration, routes, handlers, views, widgets, interceptors, and can contain other modules. They are a vital part of ContentBox, and the ease in which you can use, and develop for ContentBox. • Ortus Modules • Developed and maintained by the Ortus team • Community Modules • Built by the community and shared on ForgeBox.io • Custom Modules • Built by yourself to fulfill your own needs • Publish it on ForgeBox so others can use it :)
  • 10. Built on Modules ContentBox itself is made up of 4 separate Modules ( and their submodules ), ContentBox, ContentBox- Admin, ContentBox-UI and ContentBox-API. One of the best security features of ContentBox is the fact that you can remove the Admin module from your production installs, removing the ability for the admin to get hacked, because it is not even present on your production server. • File Structure ContentBox Modules
  • 11. Installing Modules Modules on ContentBox can easily be installed via CommandBox. Just look for the module you want to install on ForgeBox and install it. box install cbSocialite ContentBox Modules
  • 12. Managing Modules Modules can be activated/deactivated at any time which gives you the ability to restrict access to a specific module if desired. When working on custom modules, you will be able to scan the modules_app directory for the new modules to show up and activate them whenever you want ContentBox Modules
  • 13. Developing For ContentBox ContentBox's modular architecture, combined with the awesome power of the ColdBox MVC development framework, allows for a familiar, yet unrestricted, platform from which to develop great web applications. ContentBox is comprised of four modules • contentbox - Includes the the underlying libraries for content organization and presentation • contentbox-admin - Provides the administrative interface for managing your CMS • contentbox-ui - Provides shared libraries for the user interface which are used for presentation and which may be extended to your application requirements. • contentbox-api - Provides a fully documented API to power any external app easily and consume content anywhere
  • 14. Front End Development In developing your user interface, the majority of your time will be spent creating content in the admin and modifying files from within your custom theme, located in the modules_app/contentbox-custom/_themes directory. With state-of-the art development tools like CommandBox to assist with scaffolding and dependency management and Coldbox Elixir, it's easy to build out your theme in a fraction of the time it might otherwise take.
  • 15. File Structure All the custom frontend work will be done within the modules_app/contentbox-custom folder Front End Development • _content ( Location for the custom media ) • _modules ( All the custom modules will go here ) • _themes ( Custom Themes, built by the developer and not installed via ForgeBox ) • _widgets ( custom widgets - built by the developer and not installed via ForgeBox )
  • 16. Javascript You have two options for working with Javascript in the admin. jsAppendList This expects the name of the js file ( without the .js extension ) which is located in the ContentBox includes/ js folder. This is a simple convention based approach, so you can easily just append a file, for example arrayAppend( jsAppendList, 'dragula' ) to load /includes/js/dragula.js jsFullAppendList This expects the full path of the js file ( including the .js extension ), including the location. This is useful, because you may be using grunt or gulp to compile files, store them in different locations, or actually link out to a CDN for some of your scripts. For example: arrayAppend( jsFullAppendList, '/includes/js/dragula.js' ); arrayAppend( jsFullAppendList, 'https://code.jquery.com/jquery-3.1.1.min.js' ); Front End Development
  • 17. Javascript How the JS is output Inside of /modules/contentbox-admin/layouts/inc/HTMLBodyEnd.cfm you will see the following code. <cfloop list="#event.getValue( "jsAppendList", "", true )#" index="js"> <script src="#prc.cbroot#/includes/js/#js#.js"></script> </cfloop> <cfloop list="#event.getValue( "jsFullAppendList", "", true )#" index="js"> <script src="#js#"></script> </cfloop> Front End Development
  • 18. CSS Assets You have two options for working with CSS in the admin. cssAppendList This expects the name of the CSS file ( without the .css extension ) which is located in the ContentBox includes/css folder. This is a simple convention based approach, so you can easily just append a file, for example arrayAppend( cssAppendList, 'dragula' ) to load /includes/css/dragula.css cssFullAppendList This expects the full path of the css file ( including the .css extension ), including the location. This is useful, because you may be using grunt or gulp to compile files, store them in different locations, or actually link out to a CDN for some of your scripts. For example arrayAppend( cssFullAppendList, '/includes/css/dragula.css' ); arrayAppend( cssFullAppendList, 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/ bootstrap.min.css' ); Front End Development
  • 19. CSS Assets How the CSS is output Inside of /modules/contentbox-admin/layouts/inc/HTMLHead.cfm you will see the following code. <cfloop list="#event.getValue( "cssAppendList", "", true )#" index="css"> <cfset addAsset( "#prc.cbroot#/includes/css/#css#.css" )> </cfloop> <cfloop list="#event.getValue( "cssFullAppendList", "", true )#" index="css"> <cfset addAsset( "#css#" )> </cfloop> Front End Development
  • 20. Theme Development A theme plays an important role when when customizing a site.These are the pieces that make part of a theme, you can always follow the default theme as reference when building yours. • Theme.cfc (The CFC that models and configures your theme implementation) • layouts (The folder that contains layouts in your theme) • blog.cfm (Mandatory layout used for all blog views by convention) • pages.cfm (Mandatory layout used for all pages by convention) • maintenance.cfm (Optional used when in maintenance mode, else defaults to pages) • search.cfm (Optional used when doing searches, else defaults to pages) • views (The folder that contains views for rendering) • archives.cfm (MANDATORY: The view used to render out blog archives.) • entry.cfm (MANDATORY: The view used to render out a single blog entry with comments, etc.) • error.cfm (MANDATORY: The view used to display errors when they ocurr in your blog or pages) • index.cfm (MANDATORY: The view used to render out the home page where all blog entries are rendered) • notfound.cfm (The view used to display messages to users when a blog entry requested was not found in our system.) • page.cfm (MANDATORY: The view used to render out individual pages.) Front End Development
  • 21. Theme Development For more details on how to build a custom theme check out the official ContentBox docs https://contentbox.ortusbooks.com/font-end-development/theme-development Front End Development
  • 22. Back End Development ContentBox allows to to extend the core to take care of those special needs and custom business logic you need to take care of. You can override some the ContentBox settings in two ways: 1. via ColdBox.cfc This will allow developers to override any runtime setting for any site. All you need to do is create a contentbox structure in your configure() or any tier method, with the name of the site (default is the default site) and then any setting name-value pair.
  • 23. ContentBox Settings 2. Override ContentBox Settings via Java Environment Variables You can also override any runtime ContentBox setting by passing them via Docker/Java Runtime variables. Since these are string keys we can now use our fancy structures like the settings above, so you must adhere to our recognition pattern: contentbox_{site}_{setting}=value Here is an example on adding a custom media root: -Dcontentbox_default_cb_media_directoryRoot=./build/docker/contentbox/content This will allow especially Docker environments to override settings as environments or even provide secrets. More is coming, so stay tuned to our updates. Back End Development
  • 24. Module Locations and Conventions Modules with ContentBox and ColdBox is fairly straightforward. You work with conventions, but you have control. Depending on the type of module, there are different methods and locations to install the module into. • /modules - ColdBox Modules - git ignored, controlled by CommandBox • /modules_app - ColdBox App Modules - Your application global modules - included in your git repo • /modules/contentbox/modules - ContentBox Always Load Modules • /modules/contentbox/modules_user - ContentBox Admin Managed Modules Back End Development
  • 25. Build a Module If you are planning to build a module, a great way to get started is Scaffolding a Module using CommandBox. > coldbox create module The params for this command are the following: required name (Name of the module to create.) author = "" (Whoever wrote this module) authorURL = "" (The author's URL) description = "" (The description for this module) version = "1.0.0" (The semantic version number: major.minior.patch) cfmapping (A CF app mapping to create that points to the root of this module) modelNamespace (The namespace to use when mapping the models in this module) dependencies = "" (The list of dependencies for this module) directory = "modules_app" (The base directory to create your model in and creates the directory if it does not exist.) boolean views = "true" (Create the views folder on creatin or remove it. Defaults to true) Back End Development
  • 26. Module File Structure The command creates a ModuleConfig file with all your information. It creates a default handler, called Home.cfc in the handlers folder. It creates a models folder, with just a placeholder file. It also creates a views folder, with the home folder to match the handler, and creates a default index.cfm view. Back End Development
  • 27. ModuleConfig.cfc This is the config file that ColdBox loads to setup the module, and get it ready to use. It can setup a lot of things, including the mapping, entry point, and a lot more. Back End Development
  • 28. Build an Admin Module ContentBox makes it easy to create your own Admin Modules, add Menu Items into the Admin Interface, use ContentBox Admin Users and Permissions instead of building your own security by extending ContentBox. When you are building admin modules, you need to build / install those modules into the modules_app/ contentbox-custom/_modules folder. Why build a normal website the hard way when ContentBox already has all the login, password reset, security roles and permissions build for you? You can simply use the admin and add more buttons for your admin modules. Back End Development
  • 29. Admin Menus Add Menu Items for your Admin Modules into the Admin Interface You need to update the onLoad and onUnload functions of your ModuleConfig.cfc file. Back End Development
  • 30. Adding Meta to your Modules One common issue with using the theme for your module is the way Meta Tags are generated. Having your own module, its hard to set your Title, Keywords and Description. You are able to do this inside your Module Handler Events Back End Development
  • 31. DEMO
  • 32. THANK YOU Thanks to our sponsors
  • 33. Thanks to our sponsors