Posted by hankkosovo on March 16, 2009 at 2:08am
Let’s say you had a content type of ‘story’, and you wanted to create a dynamic page that listed the latest stories, as well as the most commented stories and featured stories. How would you do this without using panels, I imagine you would have to create a view for each story listings, but how would you call all three of these views in to one page?
Thanks very much in advance for you’re help.
Comments
=-=
if you don't want to use panels. investigate the composite layout module. Otherwise, I know of no other way.
I wrote a guide/analysis the
I wrote a guide/analysis the other day about how to create a page such as www.drupalsn.com without using Panels:
Analysis of DrupalSN.com home page
You're already aware about making the Views which will be included as part of the page (as you'd have to do in Panels too). This explains how to apply them using blocks and regions, and a technique of using a CCK type called "Section" to use as the sort of anchor page for each of these dynamic pages to be assembled onto.
If you decide to try it feel free to ask for any advice or questions if you get stuck. I don't have enough time at the moment, but in the future I'd like to write a guide on how to do this step by step, with more direct examples of my own, code snippets, etc. For now I think with this paired with looking at drupalsn.com visually as well as peeking with Firebug should get you going in the right direction.
-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides
Try some input filter options
The small module "insert view" is great for this sort of thing. There are "insert block" and "insert node" modules as well that can be useful. With some fixed width floating DIV's or good old tables, you can put together almost any design.
The code can also be used as a good starting point for you own page callbacks if you need to do more.
Alan Davison
Back roads somewhere in South America
Thanks for all the help, I
Thanks for all the help, I was thinking along the lines of creating a page template for that dynamic stories page ie: page--stories.tpl.php and then hand coding the calling of the separate views in the this template, Is this a feasible option do you think?
I wouldn't really recommend
I wouldn't really recommend that... the page.tpl.php template in Drupal is the "main" overarching template for your theme/layout. If you duplicate another copy of it for each main page/section of your site, you will substantially increase the amount of code you have to take care of (e.g. say you realize you need to adjust some various HTML in one... and then you have to repeat the changes in every copy).
If you do go that route though, you'll have to follow a guide (theming section, e.g. this or others http://drupal.org/node/223440) for registering those template files, as that pattern is not one Drupal looks for on its own.
If you don't want to use blocks/regions, then have a look at http://drupal.org/project/viewreference
(in this case I suggest you go with the CCK type to serve as the "section" pages... each page of this type would have the URL you choose or setup via Pathauto, and could contain a unique selection of Views directly included into the node).
I also recommend augmenting this with unique CSS classes on the
<body>of your page. See this lesson http://www.davidnewkerk.com/book/122-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides
I’m not against using blocks
I’m not against using blocks and regions, but wouldn’t I have to create a new page template for each page that has different regions on anyway? How would I go about this? The site that I am making has quite a complex design, there are certain pages with 4 columns, others with 3 and some with 2.
Yes I did plan on using body classes to define certain styles as well, thanks for that.
I really hate to be a bother, I’m just struggling with the best way to do this.
Also, would it not be a good idea to use include files for the header and footer regions, to reduce the amount of code to manage?