Both CMSB-generated content and hand-coded

5 posts by 3 authors in: Forums > CMS Builder
Last Post: August 30, 2009   (RSS)

Re: [pineridgefarm] Both CMSB-generated content and hand-coded

By gkornbluth - August 29, 2009

You could probably create some fields (text boxes or wysiwyg) into which you could paste the code that needs to be edited, but it seems like that defeats one of the main reasons for using CMSB in the first place, which is to allow users to edit the content of a site without needing to deal with code and the real possibility of "breaking" a page which you'll then have to fix.

You could look into the idea of creating CMSB fields for all the data and then using using "If" statements to determine whether the individual content has been updated.

If it has been updated then show the updated content from the database. If it has not been updated (the field in question is blank) then show the old hand coded code.

Eventually, all of the site content will be pulled from the database and all of the old hand coding can go away. (or just stay there and never be seen or used)

Hope that works for you.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [pineridgefarm] Both CMSB-generated content and hand-coded

By Chris - August 29, 2009

Hi Dave,

You can have both CMSb-generated content and manually-coded content on the same page; however, you won't be able to edit the CMSb content from a text editor or vice-versa. Nor, I think, would you want to.

Once you move your content under CMSb-control it will exist in a database. Your pages will then have PHP code on them to fetch their content from your database. It will be very easy to change this content (or add more content) by logging into the CMSb software.

You decide in the construction of your pages which content is hard-coded and which will come from CMSb.

As I already have tons of content on the pages, how can I get that content to be editable in CMSB?


Here's how I would do it:

First, create a CMSb section to model the content you want to manage. Next, copy-and-paste all the existing content from your site into the fields you've configured for that section (two browser windows side-by-side work wonders.) Create new pages by asking CMSb to generate Viewer code for you, then cut-and-paste that code into a copy of your original page, replacing the content with the code to fetch that content from the database. Test the pages to make sure they work perfectly. Rinse and repeat the above steps for more sections of content. Finally, replace your original pages / change your links / add rewrite rules to get your visitors using the new pages.

If you can show us some examples of the type of content you currently have, we can suggest how to tackle the problem and what sections to use.

One last thing: if there's way too much content on your existing site to copy-and-paste it into CMSb, it's possible to write scripts to import your content into your database (or hire someone to do it.)

Let us know exactly what it is you want to accomplish and we'll be able to offer more advice.
All the best,
Chris

Re: [chris] Both CMSB-generated content and hand-coded

By pineridgefarm - August 30, 2009

Thank you both for the advice.

Chris, I'd like to be able to submit sample for support other than via this forum. May I do so in an email?

Dave

Re: [pineridgefarm] Both CMSB-generated content and hand-coded

By Chris - August 30, 2009

Hi Dave,

Sure thing! My email address is chris@interactivetools.com.
All the best,
Chris