Powered by Digitalus CMS

There are a wide range of tools that allow people to edit websites. Some are very easy to use, and others allow an experienced developer to do amazing things. The Digitalus Site Manager bridges the gap...it makes it easy for people with basic computer skills to maintain their site content. Advanced users have the full power of the Zend Framework, Jquery AJAX library, and the DSF framework to do virtually anything that is possible.

Digitalus CMS Resources

Downloads

This project is being being hosted by Google Code. Click here to download the source code.

Layouts

Layouts can be thought of as subtemplates.  If you go to the home page of this site you will see that the main content is just displayed as common html.  Then in this section you see that the subpages are displayed as a list with an intro and a link to view the full content.  This is done with two layouts.

Default Layout

This layout just displays the page headline, content, and a module if it exists.

Tags used in this layout

  • $this->pageObj->getHeadline() - loads the page headline.  this will default to the page title if it is not set.
  • $this->page->content - note that this does not have () after it.  this is because this is a property, not a function.  Generally $this->pageObj is used accessing dynamic data (like the headline that has a default).  $this->page is the Zend Db Table rowset for the current page.
  • $this->RenderModule() - this renders the module for the page if one is set

A More Dynamic Example

The modular data layout displays the current page's content, then a list of pages that are children of the current page (this section uses this layout).

 Tags used in this layout

  • $this->pageObj->getChildren() - returns a Zend Db Table Rowset of all of the current page's children. 
  • $this->cleanUri() - this is a view helper that cleans up the request uri.  I always use this for the base of links.
  • $this->pageObj->getHeadline($child) - this time we pass the getHeadline method the child row.  It will return the child's headline.
  • $this->TruncateText($child->content, 50) - another view helper.  This truncates the text you pass it, returning the first 50 words in this case.

The DSF toolbox

The DSF toolbox is where i organize all of the little functions the app uses.  There is a more detailed explanation in the developer docs, but keep these in mind.

  • DSF_Toolbox_String::addHyphens($child->title) - this function replaces all of the spaces in the title with hyphens

About using php in your views

You can use any php scripts you want in your views.  There are a few important things to consider:

  • use the built in functionality when possible.  This will ensure that when we update the core your views will still work.
  • I always test my variables before i use them.  if($children && count($children) > 0){ ... tests to make sure that the page has children before it tries to loop through them.  While a production site should have PHP error reporting turned off it is important that your pages will validate E_STRICT.

 


Web technologies are evolving at a blinding rate. The days are gone where it was good enough to just put up a beautiful design. Your customers are looking for fresh, interactive content...a site that effortlessly tells them why you are the right choice!

Search Site

Bookmark Page

Want to learn more?