3

Apologies for the inspecific title, but my question is a relatively generic one!

I'm relatively new to Drupal, and because I've historically had a very different approach to CMS implementation, I think I may be missing the point of the architectural qualities of Drupal.

I'm a .NET developer who's used Umbraco and EPiServer a lot, but had limited experience in Drupal.

What Umbraco offers is a way for users to organise their content in the admin panel, such that items will happily sit in a tree structure under other items.

In the case that you have a news section, you would have the following structure in Umbraco:

News landing page
- News story 1
- News story 2
- News story 3

This hierarchical approach is also easily transferrable to organising other types of content, such as slideshows for a specific page. You could have a homepage which would consist of a slideshow with four slides in it, and that slideshow could be specific to that homepage. This would look like this:

  • Homepage
    • - Slideshow
    • + Slide 1
    • + Slide 2
    • + Slide 3
    • + Slide 4

In Drupal, I've noticed that all pages sit together in a sort of "page soup" as someone else coined, and an implementation of a taxonomy is relied upon to ensure that content is organised on the front-end.

I'm aware that Drupal offers a menu structure which allows you to form this structure, but it seems like if you want to organise actual content rather than memory references to content, you're a bit lost.

Another feature I found extremely useful in Umbraco is the ability to programmatically fetch page objects, and to have access to an API allowing me to get the children of that page, and display them within the markup the way that I see fit. The filesystem for this would look like this:

Homepage.aspx
- Slideshow.ascx

This allows you to drag that slideshow.ascx control onto any page, and the control will go and get the children of its parent, and display those slideshow items automatically.

Is all of this possible within Drupal? Am I missing the point entirely? I would love a bit of direction on this, as I've been floating around the general area of content for a little while now!

Thanks for any help!

3

This is a common grey area for new developers to Drupal. The root for every "page" is index.php. There is no "page" per se, every dynamically generated "page" is a container. Regions (found in either /themes/bartik/bartik.info file in Drupal 7 installations without any changes or additions to Drupal core yet) establish the sections of the container that you can add different types of content (i.e., blocks, menus, views, etal.) I would recommend reading about the bootstrap process for Drupal, it is during bootstrap that everything gets called on a url by url basis. Using the Drupal interface and adding modules adds ways to "generate" or "contain" different types of content. There are over 10,000 modules (and counting) to add functionality to the Drupal enviroment. There are, generally, a handful of recommended modules that provide the most cohesive and robust ways to develop almost anything within your Drupal site that are recommended. This ultimate flexibility takes a little time to grasp and work with but once you do, you never want to go back.

  • Thanks for thinking about my problem and posting such a comprehensive answer. :) – Karl Sep 9 '11 at 9:45
2

I think a lot of what you want can be achieved with the Views module. It's a module that creates custom queries of nodes, users, etc. from the database. While the core doesn't really have the sort of admin panel you're talking about, you can create a custom one using views that lists the children of each node. How you create that parent-child relationship can be achieved using taxonomy or CCK node references (in Drupal 6) or the Field API in Drupal 7.

The same goes for your second point. Views provides several default ways to output those queries (pages, blocks, RSS feeds, etc.) and you can always modify the template files to change the output. Views also take arguments, so you can create one view, pass it some arguments and re-use the same view in multiple ways.

  • Thanks very much for the advice. I gave Views ago, but they didn't work out quite as I wanted them to. – Karl Sep 9 '11 at 9:44
2

I've used a collection of modules to achieve what I wanted with Drupal; the most integral of these is Node Hierarchy.

This has allowed me to use the parent-child relationship I was after, and although this may not be how Drupal was intended to structure content, I've certainly found it extremely useful!

I had intended to utilise views as well, but abandoned them as they didn't suit what I was after. However, if you want to programmatically introduce views into your code rather than using the full UI and blocks stuff, you can look at this example:

http://drupal.org/node/685432

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.