Please give me your thoughts and suggestions...
I'm thinking of writing a module for the purpose of creating page shells. I don't feel that there is currently a good way of handling this with Drupal. Basically I would like to have the freedom of:
- Creating a page (shell)
----> Then create regions within the page
----> And then assigning various nodes to those regions
In addition to this I would like to assign the page shell an alias and a theme. This would more strongly mimic traditional Web development while still taking advantage of Drupal's CMS features.
In a lot of ways it would parallel what flexinode already does. For example flexinode allows a user to create a new page type, and assign fields to the page. Within those fields the user can enter raw data.
My hope is that a page shell module would allow a user to create a new page shell, and instead of adding text-areas, drop down menus or other types of forms, the module would allow you to create regions. Each new region would then sever as a container for nodes. You could have a node repository where you select which nodes you wanted to assign a region. Once assigned to the region you could schedule each node to be displayed a certain period of time.
Such a module will require some tweaking of xtemplate so that the template system knows what to do with the various regions. My thinking is that each region could be wrapped in a div tag, along with some id/class that describes the region. Then within the CSS you could style the region and change it's placement, color etc.
The only thing that I'm uncertain of, is how much of each node should be pulled into each region? For example when a node is assigned to a region, should only the title get pulled into the region along with a link? It seems like you'd need a lot of flexibility with regard to the regions and what node information to capture and schedule. In some circumstances I'd like to have just the headings along with links, but in other instances I'd like to maybe pull in just one feature with thumbnail image. I'm still not sure what the answer to that question is.
What are your thoughts? Does this make sense and would it be useful? More importantly can you offer me any suggestions on how to approach such a module? Is anyone interested in helping?
Thanks,
- Strayhand
Comments
hoping for this
I've been thinking about this for a long time, but since I lack the coding skills to do it, I never suggested it. But I would be glad to test it :)
One particular use I imagined was for the front page of a site. For example, stories could still be listed on the front page, but would do so surrounded by other content without taking primacy.
As for a suggestion, I would think that creating an HTML comment tag that would allow someone to specify the relative url for the node would be a practical way to implement this--then no need for a "node repository." Obviously, the div id for the region should include the node id to allow for custom styling in the theme. How you get Drupal to preprocess those nodes into the node so that the module could control whether to display a title, or not, I have no idea :) But I do think that control over whether to display headings only should be handled in the URL query by Drupal core, rather than more customization of display in this module (seems a useful standard feature for Drupal with or without this module).
Wrong forum
Sorry, meant to post this under modules. Although it does relate to themes in a round about way.
CSS to the rescue
I think you could simply output a DIV for each node. With proper tagging of each piece of the node (submitter, date, body, etc.), you might be able leave the rest to carefully crafted CSS. parts which the admin didn't want to show would be hidden using CSS.
Not just presentation
I understood this comment/wish differently. I understood the container to be more a way of building the page by aggregation, where you can put a collection of nodes into a container, and probably then that container into a larger container, eventually building up the whole. This could be useful if you were tracking projects, for example. Then you could combine event nodes with person nodes with task nodes to be a project node. Call the project node and it automatically loads the others with it. This 'has a' relationship can be very useful. I'd love to see flexinode grow to support this type of relations. Then we'd just need 'is a', and we'd have a pseudo-OO content schema.
- Robert Douglass
-----
visit me at www.robshouse.net
CSS and term-node relations
There is a topic about how to display nodes assigned to a term. To sum up that topic, you call site.com/taxonomy/page/or/45 (if 45 is a term id) and that's it. After that, all you need is some CSS.
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
Not sure I understand exactly but....
This idea, if i understand correctly would be great.
Here is what Ive been hoping for Drupal and cms's in general. It seems that almost all the cms's I investigate for my projects have a primary failing or limitation. While they do allow you to manage your content they dont allow your full freedom in how you want that content to be displayed.
It doesnt matter which cms you look at, all of them upon first visiting their homepages, automatically tell you youve landed on a cms generated page. Everyone knows when they are visiting a phpnuke page or a any of the various other portal type pages. The structure limits creativity and flexibility of placement of the content.
It would be great if Drupal had the flexibility to have a blank page in which I was not limited to where and how and when I placed my content. If I could have a static box of text in the first column that always stayed where I put it and then a blog assigned under that that took up a certain amount of space and then under that a navigation system etc etc etc. Basically a cms that acted like a Mr. Potatohead. Anything is allowed to go anywhere on each individual page. Or if i so choose something more structured. In any case the point is that I would be the one choosing not the cms.
Not sure if this is what your saying strayhand but seems similar. This would include things like each bit of content not having a posted by and date and also the ability to turn off the links that appear relative to taxonomy for each content block/post. Basically freedom from structure and the ability to assign my own.
That along with more of a focus on easy install and a core set of really kickass themes would draw a huge following to Drupal. It would be a catagory killer. Drupal would reign supreme and the influx of new users would create a great deal of new coders and users which would lead to new themes and ideas and modules and...etc etc etc.
Heres looking to an open future.
Sincerely,
Travis U.
The reason for this flexibility is that ive found that due to the inherent structuring that Drupal has I am not able to use if for most of my projects as Its not flexible enough to allow for different styles of sites that dont fit the portal/community model and also difficulties with doing proper SEO so that my sites can get good rankings in the various search engines.
Moving Forward
I put together a quick pdf of the different pages that I think the module will need. This should also help explain what I'm purposing. Check out the page outlines for this module here. And here is an html document that explains the db tables that I'm thinking of using.
Is there anyone who is interested in working with me on this?
This is my first module and it's been painful trying to figure out what the different hooks do. I'm also new to writing PHP and SQL statements
Thank you for your comments
- Strayhand
Took a look at your doc's...
Dear Strayhand,
This is a GREAT idea. It will increase the ability to make your pages do and look like you want them to look. I personally think something that would allow this flexibilty should go into the core, but a module would be awesome too.
If I was a coder I would help you, sadly I am not. I hope others pick up on how important this functionality is and give you some help.
Sincerely,
Travis U.
Once upon a time I had a simi
Once upon a time I had a similar idea which I also sort of implemented. What I am wondering is: How are you going to keep the various nodes in the designated areas?
--
Drupal services
My Drupal services
Everything in its right place
I have separate tables in the database to keep track of everything. Read more about the db structure here, (I've noticed a few bugs in my document, I'll fix them today).
But to answer your question, I'm thinking of changing the xtemplate logic so that it checks to see if the node is of the type "shell" in which case it will render the page differently. By differently I mean, it will wrap all of the regions in div tags with unique id/classes. Each region will be inserted with the assigned nodes. The nodes will be brought into the regions according to filters which the administrator assigns (see my pdf document). I'm thinking that an include file could keep track of additional filters that administrators want to use to filter nodes into the regions.
I'm making a number of assumptions here, and I haven't figured out exactly what kind of changes need to be made to xtemplate. But I'm confident that if the proper data exists in the database that I should be able to write the corresponding logic to render the pages the way that I want.
Thoughts?
I am very interested in thos
I am very interested in thos module. I regret I am not able to help with the coding, but I am more than happy to test anything you wish.
I am new to Drupal and am developing a medical website and this kind of flexibility would be very advantageous.
Regards,
Ros
Nodes within nodes within nodes...
I think it would be very nice if this module were to utilise some of the features noted in the discussions here and here on document management/image support. One of the notions condensed from those discussions is of nodes that contain other nodes (and how to render them). What you propose would be a great rendering scheme for nodes that contain other nodes.
I've been somewhat buried lately (under a heap of slashcode), but will have time to work on Drupal code soon. Great work!
More Information: Request for help
I've updated my description of the module. You can read about it here
I'm under a tight schedule for getting this done, and if I'm not able to make some serious headway in the next few days then I may hold off on developing the module or even using Drupal (I need more control over my Web site then the default system allows).
Thank you for all of your comments, I understand that many of you are not "programmers", but there are probably other ways that you can help with this module. Take a look at the outline that I've created for this project. If you see something that you're able to research, or contribute please feel free to do so here. I've also listed some questions at the bottom which I need help with.
Project Outline
I've already mapped most of this out. You can review my table descriptions and structure here. I'm new to relational databases. I'm uncertain of the best method for linking the various database tables. If you have any expertise or knowledge in this area please share. As of right now I'm writing code that updates all of the tables when ever a change is made to one. I'm wondering if there is a better way.
Question: What is the best method of linking data between multiple tables?
I've made an outline of the various administrative pages that I think this module will require. I think that the most logical approach will be to add features to the module as we go along. Due to time constraints I don't think that everything can be accomplished in the first version of the module. Path alias, themes, region filters and scheduling are features which I believe will have to be in a later version of the module. I've tried to outline the process below:
Once all of the page shell related information is in the database, we will need to modify xtemplate so that it can render the shell correctly. I recommend copying xtemplate and renaming it so that any changes to the module will not screw up your site. I've already copied xtemplate and renamed it mxtemplate. I'm not entirely sure where to start hacking xtemplate. At first I was thinking it could be done easily with the xtemplate_page function, however I think it will require some changes to the xtemplate.inc file. Basically I'm hoping to create a flag that checks the node type, if the node is of the type "shell" then I want to shoot xtemplate to a different set of functions which will wrap the regions in unique div tags and parse out the nodes according to the region filters.
I'll post more on this later. If you have suggestions I'm all ears.
Question: How would you recommend modifying xtemplate to display the page shell information?
If I manage to get this far I'll need your assistance with packaging the module so that it can be distributed and tested.
Question: Is anyone familiar with packaging and distributing modules?
I'll need a hand testing this module to see where it might break and where we might need to add some error checking and validation.
Questions
While working on this project I've used several other modules as examples (path.module, flexinode.module, taxonomy.module, etc.). One thing that I'm struggling with is "menu ( )" found within the _list function. It has several parameters and I'm currious what some of them mean. For example the path module:
This module passes the parameter "4" for the first menu item. What does "4" mean? I've seen this used with switch statements within the _admin function:
Where does "op" come from and what does the function arg( ) do?
I've also ran into a few bumps trying to update the URL of the admin page that I'm currently on. For example I'll execute a function and tell it to return to the overview page, however the URL in the browser still says that I'm on the previous administrative page. How do I update the URL to reflect the current admin page that I'm on?
If you read this far thank you :)
Heads Up!
I'm making progress on the module. As of right now I've completed:
- creating, updating and deleting page shells
- creating, updating and deleting regions
- viewing a repository of nodes and assigning nodes to a region
I still have a lot of error checking to do. I also need to:
- add the path and theme functionality to page shells
- add the filter functionality to regions (this is a big one)
- work out some kinks with the assignment of nodes to regions
- add node scheduling (this will come later)
- hack xtemplate (mxtemplate) to render the regions
I hope to have something available for others to test by the end of next week. Hopefully a real programmer will be able to take things from there. I'm a content manager, not a code jockey ;)
Peace,
-Strayhand
Help with xtemplate
I'm in the process of hacking xtemplate to render the shell regions and nodes. I was successful in rendering the shell information, however, the method that I used generated a permissions error and I'm concerned that it may present a security risk.
Does anyone know how to add new subsitution tags to the xtemplate system? I've posted a special thread about this here
I can help with coding
I am interested in this module, I am setting up a site to contain course and staff information for a University and need some functionality to add course pages, and staff pages as well as a host of static pages.
Let me know where you are developing this (sourceforge) and the docs on it and I will try to help with developing it.
Page Shell Project
To everyone and anyone interested in working on this module. I'm in the process of figuring out where and how to post my code. I NEED your help with this.
Until I figure out cvs, and sourceforge.net, here's the module in it's raw form.
strayhand is the bomb....
Im so excited about this module I could pee myself.
I know drupal can be used to build almost any style of site but for the average person with not alot of coding skills busting out of the default scrolling posts style of most cms's is not easy.
This module will go along way in freeing up design posibilities.
Kudos to strayhand.
I hope others realize how dope this module is and help strayhand out in finishing it and posting it.
Sincerely,
Travis U.
Drupal CVS
There's no need to involve sourceforge in creating a Drupal module. Drupal has its own contributions CVS repository for this.
Drupal CVS
I've applied for a CVS account. I understand what CVS is supposed to do, but I'm not entirely sure how to use it. I've downloaded the WinCVS client and pending my account approval I'll try to get the code up for everyone to use (it's really rough though).
I hope that by making this code accessible in the cvs, someone who actually understands Drupal will be able to better direct this project.
Handling region data
So I've thinking about something and I wanted to get the feedback of the forum...
What is the best approach for capturing and parsing the nodes for each region?
As of right now, I have a db table called {shell_data} which holds the nid, and title of every node that will get inserted into a region. In addition to this information I have some additional fields which indicate the page and region ids. I'm using the page shell module to populate this db table, and I'm using mxtemplate to wrap the nodes in div tags and then parse the information.
I've been thinking that maybe this isn't the best approach. Should there be more distinction between the page shell module and the modified xtemplate module? Should the page shell module be responsible for filtering and wrapping the node content? I'm concerned that I'm making too many db calls from xtemplate and that performance is going to be an issue.
In part I'm asking this because I've hit a road block with xtemplate and this error message (read about it here) and I'm trying to find ways around the issue. I could use the page shell module to filter, and wrap each node and save it to a db table, but I didn't want to repeat the node data.
Does anyone have suggestions? Has anyone tried to download and install the module? I apologize for the current condition of the code(install at your own risk).
Project Status
For any of you waiting on this module. I haven't given up on this project, however I have suspended its development while I work on my news and events Web site.
When I've completed my drupal news and events Web site, (Early September) I will more than likely start over from stratch. I've learned so much in the last 4 weeks about drupal and I think it would be best if I started this project clean.
Thank you all for your ideas...
Will Wait
Will wait. :)
Take a look at Tiles
If you have a chance, see how Tiles is designed. It's a Java solution, usually used with the Struts framwork. It provides a means to build up pages using components (Tiles). It works very well and has some nice features. Here is the user guide:
http://struts.apache.org/userGuide/dev_tiles.html
Check out the Overview of Tiles Features. And here is an article with more info (a little dated, but you can get the idea):
http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html
It is all .JSP/Struts based, but you can probably get the idea. I can help to translate if you have any questions.
I used Tiles on a very large application and it was very worthwhile. I would actually think it would be a good basis for a CMS. There is a bit of learning curve, but once you get it, it's very powerful.
When you restart the development, I'll pitch in if I can.
Yeah
It is one the most wanted features from my point of view. I'm badly tired from seeking for CMS in this "dark forest" of open source portal building/management systems which like to call themselves CMS. This portal orientation with hardcoded left/middle/right alignment of blocks, one page templates forced to use all over the site makes all these efforts useless in majority of more serious and professional projects.
Drupal is a great framework, I'm new with it, but am here because I like the way framework part is implemented. I believe it is one of the best opensource frameworks for php. Sadly, the CMS part has the same problems like in most of other projects.
I strongly support this idea:
* node is type and, by the end of day, piece of information;
* suggested page shell defines what should be shown in page and generates structure markup;
* for each of shells style may be applied (or inherited from parent) to define the layout.
I need to complete a couple of my current commercial projects, and could join if you get the need in help with development.
good luck :)
Vaidotas
Programmers Wanted
Now that things are beginning to settle down from the 4.5 launch, maybe there will be a few more programmers who want to contribute to this module. I have again applied for a cvs account, lets hope I get approved :) Once I get a cvs account I'll setup a project, and try to find a permanent home for the related files.
I'm in the process of migrating my Web site, so the supporting documents for this module have been moved to here:
Module Outline
If you're interested in contributing your programming skills to this module, please e-mail me. In your e-mail please indicate your skills along with what you'd like to contribute. I'm a novice programmer with big dreams, but I lack some of the expertise to successfully implement this module.
I look forward to hearing from some of you.
-strayhand
p.s. See what i've been up to, News and Event. This site is the reason the page shell module has been delayed.
Any updates for this module?
This sounds good... I'm thinking of testing the raw module listed above, but I thought I'd post and see where development is at... maybe this has been renamed and is available as an official release already?
Well spotted
This is going in my bookmarks.
I've been thinking of a less ambitious version of this for quite some time -- at least the ability to top and tail nodes with headers and footers. This would allow, for example, a group of pages all to have links between them, maintained in one place. It would also be simple to implement with hook_nodeapi(), iirc.
I can't produce anything before July at the earliest, though.
Blocks anywhere
There is a feature that is under development now that will allow blocks to be displayed anywhere and not just in the side bars.
This will be in Drupal core.
http://drupal.org/node/16216
--
Consulting: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba
Also
I've got the "layout" module installed and it works very well. The "page shell" and "layout" modules seem similar, so I thought I'd connect the two threads. Here is the discussion of the layout module:
http://drupal.org/node/18272