Description of location, folders and files of the itPage CMS codebase.
Version 4 of itPage (December 2011) saw a refactoring of the codebase into a MVC (model-view-controller) structure. This brings many benefits, including most importantly the ability to override any individual file in the base by a corresponding file placed in the local folder. It is now easier to add functionality to itPage sites by creating new MVC files and putting them in their respective folders. It is also easier to upgrade the codebase without worrying about local modifications being lost.
Below is the itPage CMS version 4.0 folder structure
app
config
modules
admin
controllers
helpers
views
base
controllers
helpers
views
local
controllers
helpers
views
maintenance
controllers
helpers
views
tooltips
views
files
files_processed
images
images_processed
install
logs
media
securefiles
Files
Images
skin
css
fonts
images
js
previews
templates
app - Contains the the itPage application base (page assenbly) code as well as the admin code.
app/config - Contains configuration files for database connection, domain name, file processing and system resources.
app/modules - Contains the various operational areas of the itPage CMS.
app/modules/admin - Contains the files necessary for the admin area to function
app/modules/base - Contains the front-end page assembly code files. You should not modify the contents of this folder if you are interested in easy upgrades. Instead put an override file in app/modules/local.
app/modules/ckeditor - Contains ckeditor, the Javascript editor that is invoked on the Edit Content and other pages
app/modules/local - Contains a set of folders that can be used to override base functionality.
app/modules/maintenance - Contains files for various maintenance routines
app/modules/tooltips - Contains the files used for tooltips throughout the system
files - This is where uploaded files (defined as any file with an extension defined in $svDocExtArray in /app/config/fileprocessing.inc) are placed
help - Files can be placed in here that you want to automatically show up as links in the left navbar "Help" area
images - This is where uploaded images (defined as any file with an extension defined in $svImageExtArray, $svMediaExtArray, or $svCSSIgnoreArray in /app/config/fileprocessing.inc) are placed
image_processed - Where the original uploaded images reside. This folder is never cleaned, so it is up to you to maintain the contents.
install - Files to install itPage. This can be safely deleted after the install process.
logs - Used for webserver and admin login logs.
media - Used for video and video previews.
securefiles - Used as a place to store securefiles. Note that this folder itself is not inherently secure, but an Apache directive must be created to prevent direct serving of these files.
skin/css - The stylesheets for the site.
skin/fonts - Any fonts used in the site should be placed in this folder.
skin/images - Images used in the admin area, header, and footer are found in this folder.
skin/js - Contains the Javascript used in the site.
skin/previews - This folder holds the template previews.
skin/templates - This folder holds all templates for the site.
Program files in the root and their functionality are:
detail.lasso - This codefile assembles and serves all the various parts of a front-end page. It usually is not seen directly in the URL, except when performing a search.
error.lasso - Used to display any program errors. This page should rarely be seen.
siteconfig.lasso - This page is a master page that fetches and constructs various data pieces. Debugging is turned on here. This file is called urlhandler.inc.
urlhandler.inc - This file is invoked by the atBegin handler in Lasso and is the first file loaded. It controls construction of the navigation heirarchy, calls the siteconfig file and can be used to tell itPage to ignore any non-itPage folders or file extensions. Common usage would be to tell itPage to ignore .php files or Wordpress folders, for example.
Each of the modules folders has a controllers folder. This folder contains the main program logic for that area.
This folder contains "helpers" or bits of code that add functionality. Helpers do such things as build slider output, construct page headers and footers, and build the page content.
The views folder contains display files, typically forms or admin page content.
Site Custom Tags - The use of automatically loading site-specific custom tags is supported. Name the file "SiteCTs.inc" and put the file in /app/modules/local/controllers/.
It is possible and perhaps even likely that you might want to modify the standard itPage behavior. itPage uses a technique called "fallback" where it will look for a file in the /app/modules/local folder first, and if it finds a file there will use it. If it doesn't find a file there, it will load it formthe base. You can use this feature to modify the standard behavior of itPage.
For example, itPage assembles front-end content page data in a specific order found in /app/modules/base/helpers/build_detail.inc. The body of an itPage content page is placed into $FinalContent, then that variable is displayed in the template. If you wanted to change the order that data displays on this page, you would make a copy of this file and place it in /app/modules/local/helpers/bulid_detail.inc, then modify this file to do what you want. Leave the original build_detail.inc intact. itPage will detect the local modification, load this file, and ignore the base file. When you go to upgrade, the local file will remain undisturbed.
The files starting with "setup" found in /app/modules/admin/controllers are used in the admin application to call modules. If new modules need to be added, these files must currently be manually updated to add the new functionality. Depending upon what you are doing you probably want to add some links to the admin left nav panel, found in /app/modules/admin/helpers/navbar_main.inc.
The site variable $svDebug controls debugging output throughout the system. Blocks of debugging output can be constructed manually by using the Debug container tag. Setting $svDebug = Y will display the debugging output. This variable can be set anywhere in the system, or it can be turned on for the whole site at the top of siteconfig.lasso.