Home
  • English
  • עברית
  • Home
  • Portfolio
  • Blog
  • Services
  • About us
  • Contact

Does every page really need to be a node?

Submitted by Amitaibu on Mon, 12/07/2009 - 23:46
— Tagged as
  • Drupal-planet

No.
Let's take the "usual" home page as an example:

  • It doesn't need to have an author
  • It doesn't have comments
  • It rarely changes (Maybe it has Views in it that change the content that is shown, but the layout and static text don't change)

So we can use Panels for that. It also makes deployment easier:

  • since the Panels are in code (same as having exported Views), it means we can prepare the Panels page on a development server and easily deploy it on a production server, without copying/ pasting nodes or do some db merge weirdness
  • Different layout and content for different roles or languages - checkout our own home page English Vs. Hebrew. You can see we flip the image and change the text layout - those are just different Panels variants.
  • Reusing our tools. We have many websites that have a standard skeleton (home page, about us, services, etc'). Once we have the Panels in code as a module, we can place it in other websites and quickly do the needed adjustment. Hack, we can even do it directly from within the code

Ok, one may argue that the client might need to change the home page - "If it was a node my client could easily edit it. What then?"
But we argue back:

  1. Meh. How often does your client really change the home page?
  2. If they do need to change it frequently, you can have the Panels page show an existing node - so the client will be able to change that node without changing the Panels itself
  3. Like Views, that should live in code - if there's some crisis and they must change the Panels, they can do it manually, and the next day you can deploy a new fixed version, and revert the Panels so it will be served back from code

Thanks merlinofchaos for yet another great module!

Comments

Searching Panels

I would like to have panels pages for my department homepages that aggregates all of that departments content, but from what I understand panels pages aren't searchable.

Is this true? How do you work around this? For instance, say I have "Human Resources" department homepage as a panel page. If a users searches for "Human Resources" will the Human Resources panel page show up in the results? I know panel nodes do, but they are much more limited.

What's your thoughts about the best approach to this situation?

  • reply
Submitted by gmclelland (not verified) on Wed, 04/14/2010 - 20:17.

@gmclelland, Indeed this is a

@gmclelland,
Indeed this is a problem. But in your case I think it makes sense to add the HR as nodes. Panels can have the Views that shows those nodes. Panels itself IMO should only "group" the elements you want to show together.

  • reply
Submitted by Amitaibu on Thu, 04/15/2010 - 11:23.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><blockquote>
  • Lines and paragraphs break automatically.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Gizra | Brener 5, Tel-Aviv 63826 Israel | +972-527-587-697 | info@gizra.com