Forum OpenACS CMS: Combinign content and templates, web site baking

Over in a totally unrelated thread , there is a discussion of publishing content repostiory data to the filesystem.

Right now, the old aD CMS package renders the content with the template and produces an html file.

There is no reason we can't combine the content with an intermediate template, and output and adp file that is untimately rendered with dynamic elements on request. Its not automatic, but its a feature I an interested in working on.

Posted by Malte Sussdorff on
I might misunderstand what you are saying, please bear with me :).

So the idea is to have a dynamic template in the database that will be written to the harddisk once it is finished (published), so it could be used by the templating system ?

Or are we going a little bit further in saying, screw adp pages and templating by acs-templating. Instead take my template, take my content and once I'm happy (aka publish), make an HTML page out of it ?

If we do either one, where on the file system would we store such pages. I'd assume within the /www section, but maybe there have been other ideas (like /content-repository-published-files).

Would the URL be generated by accessing the cr_content_id? Or would we (in case we store it in the /www tree), just recreate the site-map to reflect this (aka, if mountpoint = /mycms/index, then it should be stored in /www/mycms/index.html)  ?

If we recreate the site-map, how would we deal with the issue of having an item at /www/my-package-node/index.html ? If the package e.g is bug-tracker, which page should be served (or better, which one will be served). Or would this be prevented right from the beginning?

What if we change the site-map later on and decide to mount a package at the node where we currently store HTML files?

Okay, just a bunch of questions that came into my mind.....

Posted by Dave Bauer on

This idea does not get rid of acs-templating at all.

First off, if anything like this gets done, its totally optional.

My idea is to combine content with a template and build an adp file that will reside under the pageroot.

It would save a database hit to determine the content and template to apply from a content management system. By rendering an adp, you could use includes in the rendered document to include dynamic elements in addition to the main content.

This could be more useful with cobined content types where a page consists of several content items.

I don't see this as replacing application pages, although it might be possible.

Posted by Jun Yamog on
Dave's idea does not render the ATS useless.  It basically writing things into the file system.  As if a novice developer will do.  Make a bunch of adp, but its the system that will do the writing not the developer.

As from publishing I remember that cms publishes it to /www.  I believe the CR root is /www.  And /templates is the root template folder, and CR will publish from time to item live template on /templates.

Posted by Dave Bauer on
Oops i missed a couple of points.

I don't want to recreate the site-map, although I think a CMS should work together with other packages, and allow adding pages at any point.

We could check if a page added where a package is mounted would override an application page.

If you put a a file under the site page root it will override any pages under a package. That is already the behavior of the request processor.

Thanks for that idea, I think its very important, you probably do not want content editors to break existing application pages.

Posted by Mark Aufflick on
Dave, your idea about site-map integration came up in our recent round of cms design meetings.

Perhaps it is time to get started there again. Let's go sqaush all the 5.0 bugs so we can release, and then return to making some great new functionality.

Hmm, still have to figutre out how to get someone to pay me for this - my car rego is due ;)