pages build from various block-types instead of whole page

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
arwan

pages build from various block-types instead of whole page

Post by arwan »

Hi, I've been test driving CMS for some time now and I find it quite impressive. I admire the way the project tackles some problems with building CMS's. The only thing I don't like for my users is that page has to be edited in whole. In my previous (and personal) CMS, users could build pages by combining one or more blocks (text, imagetext, images, ...), kinda like in Typo3.
I'm now trying to find a way to implement such a workflow in CMSMS. At first, I thought about cheating by using FCKEditor templates, but that doens't allow me to easily change block-subtypes for example. Other block-types like 'Image Slideshow' wouldn't be possible either. Then I looked into extending the class CMSModuleContentType, and that seems to be the right direction. I could write a custom content-type, which acts as a container for such blocks. I'll have to write a custom script to handle CRUD operations for the various block-types into a seperate database table.
And that's where my current investigation ends... How I would go about rendering the public pages while using this workflow... I have no idea :) Same for how I would handle localization later on.
I'm dropping this message to see if any experienced users can share some advice. Any existing code/modules from which I could learn more about the way CMSMS works in this area?

Thnx,
arwan
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: pages build from various block-types instead of whole page

Post by Dr.CSS »

sounds a lot like Global Content Blocks...
arwan

Re: pages build from various block-types instead of whole page

Post by arwan »

Well, not quite... in my previous CMS, every page consists of one or more unique blocks, and every such block belongs to only one page. Also the pages where you edit the different block-types differ.
For example, one of the basic block-types is 'imagetext'. For such a block, a user has to supply a piece of text and a image file. He can also specify where the image should be positioned (above, left/below, right/...).

The reason I want such blocks, is that for some users I don't want provide the freedom (and complexity) of something like FCKEditor, but still allow them to easily show images on their website.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: pages build from various block-types instead of whole page

Post by Dr.CSS »

i thought if you were to look at the file for GCB you would find some info as to how that was setup and could structure yours with that information...
arwan

Re: pages build from various block-types instead of whole page

Post by arwan »

I was about to edit my post coz I didn't really think it through :) Indeed GCB will be of valuable use for me, thanks for your reply.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: pages build from various block-types instead of whole page

Post by Elijah Lofgren »

I plan to try creating a PageBlocks module that allows attaching of unlimited, individually edited, blocks of content to pages. We'll see how it goes.  :)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: pages build from various block-types instead of whole page

Post by Elijah Lofgren »

Elijah Lofgren wrote: I plan to try creating a PageBlocks module that allows attaching of unlimited, individually edited, blocks of content to pages. We'll see how it goes.  :)
I've got it to a working stage: http://dev.cmsmadesimple.org/projects/pageblocks
I still need to:
1. add deleting and reordering of page blocks
2. clean things up a bit.
3. make things look nicer.
4. improve the documentation.
Edit: 5. I also need make blocks be able to have parent blocks instead of assigning a heading level to each block.
If you'd like to try it out, check it from the SVN with this command:

Code: Select all

svn checkout http://svn.cmsmadesimple.org/svn/pageblocks
If you have any suggestions (other than what I already mentioned that I need to do) or find any problems please let me know.
Last edited by Anonymous on Wed Jul 19, 2006 1:22 am, edited 1 time in total.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
arwan

Re: pages build from various block-types instead of whole page

Post by arwan »

Well well, what do we have here?
I was thinking before: "Come on, I can't be the only CMS-MS user wanting something like this?!?"

I'll check it out right away, and let you know how it went. (which might take a while, since I'm quite busy the next few days)
arwan

Re: pages build from various block-types instead of whole page

Post by arwan »

I've taken a look at your module. It's looking good, but the implementation is not quite what I'm after. I'm sure there must be a more elegant (at least IMHO) solution to implement this into CMSMS. For example, like Daniel Westergren (AKA westis) noted in a feature request for your module, it should be possible for the page blocks to be a seperate content types. Before I was a bit in the dark on how the rendering process should be handled, but I think I have found a solution.
I hope I can get a working base ready by the end of this weekend.
Would you (Elijah, or perhaps somebody else?) be interested to work together on such an implementation?
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: pages build from various block-types instead of whole page

Post by Elijah Lofgren »

arwan wrote: I've taken a look at your module. It's looking good, but the implementation is not quite what I'm after. I'm sure there must be a more elegant (at least IMHO) solution to implement this into CMSMS. For example, like Daniel Westergren (AKA westis) noted in a feature request for your module, it should be possible for the page blocks to be a seperate content types.
I tried doing it, but gave up.

From: http://dev.cmsmadesimple.org/tracker/in ... 3&atid=828
Date: 2006-07-26 18:25
Sender: Elijah Lofgren

I tried doing this today and failed. Sorry, it's just too hard
for me.
arwan wrote: Before I was a bit in the dark on how the rendering process should be handled, but I think I have found a solution.
I hope I can get a working base ready by the end of this weekend.
Would you (Elijah, or perhaps somebody else?) be interested to work together on such an implementation?
If you can get it working, I'd be glad to help merge it into the PageBlocks module if you would like. I think westis and  calguy1000 said that they would be interested in making PageBlocks a core module (installed by default) if there was the ability to make Page Blocks be content types.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Post Reply

Return to “Developers Discussion”