Fooling Contribute CS3 With PHP Include Based Templates

The distribution of web templates across a higher education website seems to be quite an issue. In my search for the perfect way to do this i have found many examples of what i call “stabbings” or folks just trying to work within their systems to try and maintain some semblance of control outside of a totally locked down CMS.

I have seen templates distributed with the full CSS files, includes, images and so on. But I thought  “What’s the point of doing that if you can’t utilize the power of CSS from the root down?” I have seen include based templates that are program specific. Such as Get the Dreamweaver Template, Get the Contribute template,  and so on. I think this is fine but I would like to see a template that is independent of a specific program that works in all environments.

One of my favorite attempts to distribute a template but still offer options and control form the top down is over as Oregon State. Their template builder is fantastic, but in my opinion needs to be even simpler in order to really maintain a choke hold on the template itself. Check it out here:

Oregon State University Template Builder

ACC’s Include Based Template: (Beta)

Here is the markup for the include based template. As you can see its as simple as it gets with 4 editable areas: Title, SiteName, PageName, and the content area itself. I split the body tag out so that developers could use onLoad statements and other tags that may need to go here.

<?php include(“http://www.austincc.edu/modules/template/external/1.php”); ?>
<title>Include Page edited with Contribute</title>
<!– Attach Scripts and extra CSS below –>
<?php include(“http://www.austincc.edu/modules/template/external/2.php”); ?>
<body>
<?php include(“http://www.austincc.edu/modules/template/external/3.php”); ?>
<!– Title of webite –>
SiteName
<?php include(“http://www.austincc.edu/modules/template/external/4.php”); ?>
<!– Relative link to local menu –>
<?php include(“menu.php”); ?>
<?php include(“http://www.austincc.edu/modules/template/external/5.php”); ?>
<!– Title of page –>
PageName
<?php include(“http://www.austincc.edu/modules/template/external/6.php”); ?>
Your Content Goes here.
<?php include(“http://www.austincc.edu/modules/template/external/7.php”); ?>
<? echo “Last modified: “.date( “F d Y @ g:i a”, filemtime($_SERVER[‘SCRIPT_FILENAME’]) ); ?>
<?php include(“http://www.austincc.edu/modules/template/external/8.php”); ?>

Adobe Contribute at ACC

Adobe’s contribute software has been very helpful for content managers around the college. It helps them do simple edits and so forth while allowing web admins and developers worry about the installation and maintenance of template code. Doing this in conjunction with an include-based template that I control from the root has been difficult though. Contribute looks for Dreamweaver specific comment tags in the code and then allows users to edit only those areas. I figured that if the included files were not actually in the website that the user was editing that it would simply edit the content area and everything would be fine.

I was wrong, Contribute wanted to insert code above the include statements and so on , breaking the template. So then as a simple fix i tried actually including the editable region Dreamweaver statements in the includes themselves.

6.php (reference the above template code):

<!– TemplateEndEditable –>
</div>
<div id=”contentarea”>
<!– TemplateBeginEditable name=”SiteContent” –>

7.php (reference the above template code):

<!– TemplateEndEditable –>
</div>
</div>
</div>…

When Contribute went to edit the page, the editable regions were highlighted and everything worked as it should. The interesting thing is that Contribute did not look for for the main template hook up statement in the head of the document which is often in this format:

<!– InstanceBegin template=”/Templates/template.dwt.php” codeOutsideHTMLIsLocked=”false” –>

Simple editing has been fine, I will continue to test other functions of Adobe Contribute using these templates. I think that folks editing an include-based template with software like Adobe’s Contribute is an almost ideal situation. The only way I think I could take this further is to somehow have a Contribute be web-based app so that a local client would not be necessary.

Include Based Template in the Adobe Contribute Environment

Include Based Template Updated Without Destruction of Template Code

Tags:

Back to Top