Introducing the New HomePortals CMS Plugin

A few days ago I released the latest update to the HomePortals framework and its counterpart management platform ColdBricks. Besides the obligatory bug fixes and improvements, there was one new major feature on this release: the CMS Plugin. The CMS Plugin is a HomePortals extension to provide content management and site administration features to any HomePortals-based application without requiring the use of an external application (like ColdBricks) or building your own administration features.

At first glance it might seem that this functionality overlaps with ColdBricks, since ColdBricks has also content management features. In reality both projects, ColdBricks and the CMS Plugin, have two different and even complimentary goals. ColdBricks is a full blown platform that can be used to create and manage multiple sites and applications and can even be expanded with custom modules to handle additional administration tasks. This power and flexibility sometimes can seem a bit daunting if you only need to provide an easy and quick way of managing content and layout on a single site. And this is exactly what the CMS plugins aims for.

The CMS plugin is a super easy and quick way to instantly provide live authoring capabilities to any website that uses the HomePortals framework. The plugin provides and in-page interface layered on top of the existing webpage to allow the author to add and edit content, rearrange layout, add or remove pages and change layout templates; all without having to worry much about the internal details or configuration of the site.

Here are two screenshots of the same website, with and without the CMS Plugin activated:

From the previous screenshot you can see the main user interface. At first glance we can see controls to do several things on the page: add content, add more pages, edit page properties, view the site pages, etc. Also, the plugin detects all the regions on the page that can be used to place content and provides a quick and small handle bar to facilitate adding content to each region. All in all this type of interface may seem familiar to users with experience on most CMS products. However the difference here is that instead of building your site around a CMS, here you "inject" the CMS functionality into your site. This means that you have much more freedom in how you build and structure your application. Want ColdBox? no problem! Want Model-Glue? no problem! Want something quick and simple? you got it!

So how do you enable the plugin?

The plugin code is included in the latest version of HomePortals, so you only need to update to get it.

To activate the plugin you need to edit your homePortals-config.xml.cfm and add the following line to the < plugins / > section:

<plugin name="cms" path="homePortals.plugins.cms.plugin" />

If you are using ColdBricks, an easier way to activate the plugin is to just navigate to the site configuration page, select the "plugins" panel from the menu on the left and click on the "enable" radio button corresponding to the CMS plugin.

After you reinitialize your site to take in the configuration changes, you can access the CMS interface by appending "admin" to the url. So for example if your site is in a directory named "sample" then you would use your browser to go to:

The first time you invoke the plugin it will prompt you to create a user and password to access the authoring features. After you do so, you will be able to login and start editing your site.

All the authoring work is done on the same page without having to go elsewhere. Everything is done through dialog panels that are displayed below the main authoring bar. For example here is the dialog for editing a content module, showing a rich text editor:

As always any feedback and comments is greatly appreciated!

Enjoy

Related Blog Entries

Comments
roger tobey's Gravatar This looks very nice - I needed something in between the full portal application of ColdBricks and the layout capabilities of HomePortals
# Posted By roger tobey | 3/2/10 10:24 PM
salvatore fusto's Gravatar I'm testing homePortals, expecially modelGlue intrgration; i've enabled the cms plugin but when i try to admin a site, after defining an enabled user, i get the error:
Message:
The HOMEPORTALS argument passed to the init function is not of type homePortals.components.homePortals.

Detail:
If the component name is specified as a type of this argument, its possible that a definition file for the component cannot be found or is not accessible.

Type: homePortals.components.homePortals

Tag Context:

C:\ColdFusion8\wwwroot\homePortals\plugins\cms\cms.cfc [line 32]
C:\ColdFusion8\wwwroot\homePortals\plugins\cms\gateway.cfm [line 34]
C:\ColdFusion8\wwwroot\hpModelGlue\cms-gateway.cfm [line 1]
How can i solve?
regards
# Posted By salvatore fusto | 4/12/10 10:48 AM
Oscar Arevalo's Gravatar Salvatore,
This problem occurs because the CMS plugin does not know where to find the HomePortals engine. Normally it assumes that it will be on a variable named application.homePortals, but since the ModelGlue integration manages the singleton differently (Using ColdSpring), then you get that error. The fix is very easy. If you look into your site folder, you will see a file named cms-gateway.cfm, which was created by the plugin. Edit that file and before the cfinclude tag, insert the following:

cfset homeportals_instance = application._modelGlue.getBean("homePortals")

I'm no ModelGlue expert, but the idea here is to get a reference to the HomePortals instance that was created by the bean factory. Probably there are cleaner ways to do so, but I think this should work.

Let me know how it goes!

Oscar
# Posted By Oscar Arevalo | 4/12/10 11:50 AM
salvatore fusto's Gravatar ok, now it works fine.
i like a lot this content managment approach, not invasive with the application.
another question: invoking an mg event-handler as a widget in a module, can i specify a parameter? i.e:
<widget event="widgets.info&param=value"...>
this would be great.
thanks and regards
salvatore.
PS
i'm not able to subscribe this blog, it seems as my email address i considered a spam, nor i receive the notification of subscribed comment.
# Posted By salvatore fusto | 4/12/10 12:04 PM
Oscar Arevalo's Gravatar Any attribute that you pass to the widget tag will be available to the called event as a parameter, just like if it were passed through URL or FORM scopes on a regular event call.

Example:
<widget event="widgets.info" name="oscar" otherattrib="42" ... />

I'll check on the email. We recently had some problems on this server, so things may still not working fine. I'll see if I can add you manually.
# Posted By Oscar Arevalo | 4/12/10 12:23 PM
salvatore fusto's Gravatar Oscar, another issue with cms plugin:
i'm playing ith your hpModelGlue sample: trying to manage site with the cms plugin, but if i try to add content in any region, i get:
Invalid CFML construct found on line 13 at column 109.
ColdFusion was looking at the following text:

[

The CFML compiler was processing:

* An expression that began on line 13, column 88.
The expression might be missing an ending #, for example, #expr instead of #expr#.
* The body of a cfoutput tag beginning on line 6, column 2.
* The body of a cfoutput tag beginning on line 6, column 2.
regards
salvatore
# Posted By salvatore fusto | 4/12/10 12:25 PM
Oscar Arevalo's Gravatar Which CFML engine and version are you using?
# Posted By Oscar Arevalo | 4/12/10 1:29 PM
salvatore fusto's Gravatar ADOBE CF8.
But i planned to have a try on railo express too: may be tomorrow i'll start.
regards
# Posted By salvatore fusto | 4/12/10 2:05 PM
Oscar Arevalo's Gravatar HomePortals requires at least Adobe ColdFusion 8.01 or Railo 3.1; If you have 8.0.0, then it could be that the error you see is due to the lack of support for struct literals.
# Posted By Oscar Arevalo | 4/12/10 2:59 PM
salvatore fusto's Gravatar version is 8,0,1,195765, as reported in admin >Server Settings > Settings Summary
# Posted By salvatore fusto | 4/13/10 2:57 AM
Oscar arevalo's Gravatar So far for the easy fix... Can u post or email me a screenshot of the error?

Once we know exactly what part is breaking then it will be easier to fix
# Posted By Oscar arevalo | 4/13/10 1:04 PM
salvatore fusto's Gravatar i need your email address; you can post it privately
# Posted By salvatore fusto | 4/13/10 1:29 PM
salvatore fusto's Gravatar sent 2 images: the former is before i try to insert content, the latter is the error i get when i click on button to insert.
ps
i can't receive the email for comment subscription.
# Posted By salvatore fusto | 4/13/10 1:51 PM
salvatore fusto's Gravatar Oscar, i just tested the same under railo express 3.1.2 and all works fine!
what do you think about?
regards
# Posted By salvatore fusto | 4/13/10 1:59 PM
# Posted By ed hardy | 7/27/10 4:19 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner