Designing pages with Drupal

Submitted by Neil Drumm on Sun, 2005-02-06 16:57.

[textile]
I've been thinking about how to fill the need for more powerful page layout tools in Drupal since some time last summer. Currently, if you want a complex front page like our favorite example, "Music for America":http://musicforamerica.org/, you have to know MySQL to get what data you want, PHP to push the data around, and HTML and CSS to lay it out and make it look nice. That is a huge skillset for simply putting content on a nice-looking page.

Many CivicSpace and Drupal webmasters have created many versions of frontpage.module custom built to what they want to see on their site's front page. Josh made one for Music for America which is continually evolving with less hard coded things in it and more control for non-technical people pushing content around on the site. Sheldon made one which is now called headlines.module and seems to be continually getting more simple in the name of usability.

This is great, but I can't help but think of bigger and better solutions. Josh's module will be great for anyone who wants two columns at the top and maybe the usual /node listing underneath. Sheldon's module will be great for those who want headline-style pages. But the possibilities don't end there.

I pitched the idea of having a system of dividing up a page into columns and rows and then dropping content in, all through a web interface, at the "user and developer summit":http://civicspacelabs.org/summit in September. The idea was generally accepted, but the folks from "Downhill Battle":http://downhillbattle.org/ insisted on the need for a bit more control. No development has gone on since then, but the ideas have continued to evolve in the back of my mind. Josh's ideas for the new frontpage module he wanted to build were almost the same as what I proposed in September.

For awhile I had almost ditched the laying things out via a web interface idea. It has become a WYSIWYG interface which is probably not exactly true. The replacement was writing HTML, as is done in page nodes, with special codes meaning "drop arbitary stuff in here." Then there is a UI which lets you select which arbitrary stuff you want dropped in. The key problem with this approach is that you have to find the person that knows HTML whenever you need a new place to drop things in.

So the obvious solution is that we have to go and code both and they will use the same UI and API wherever possible.


I was talking to Adrian about

Submitted by bmann@bmanncons... on Mon, 2005-02-07 22:13.

I was talking to Adrian about modifying PHPTemplate to include a front.tpl.php template. If there is no such template, page is used instead, which would make it backwards compatible with current themes.

This obviously doesn't expose any UI for modifying that front page, but it does make coding custom front pages a little bit easier.


You wouldn't need to modify PHPTemplate

Submitted by Sheldon Rampton on Wed, 2005-02-09 11:59.

If an existing frontpage.module had a themeable function "theme_frontpage_page," all you'd need is a function "phptemplate_frontpage_page" in template.php, and then you'd just put your page into file frontpage.tpl.php. That's pretty much the way I set things up in my splash.module, except that my system makes it possible to create more than one splash page for a site.

------------------------
Sheldon Rampton
Research Director, Center for Media and Democracy
http://www.prwatch.org
http://www.sourcewatch.org
http://www.sheldonrampton.com


Take a look at my latest versions of headlines and splash module

Submitted by Sheldon Rampton on Sun, 2005-02-06 21:22.

Hey, Neil. I've just just finished some revisions to my headlines and splash modules that address some of the same problems you're working on. For details, see my comment titled "Get your red hot updates!" in the following forum thread:

http://civicspacelabs.org/node/view/5135

------------------------
Sheldon Rampton
Research Director, Center for Media and Democracy
http://www.prwatch.org
http://www.sourcewatch.org
http://www.sheldonrampton.com