1

I need to control the layout a particular, pre-existing node type using panels. However unless I'm not mistaken, creating a panel for a node type allows you to manipulate the layout for every node of that type, whereas what I want is a default panels layout - which I can change if I need to - but free reign over adding new content elements for each node I create (of that type).

I could override the nodes individually by entering the un-aliased path for each node, e.g node/123. However it's not very clean or intuitive, has to be done manually for each node, and I lose some useful information in my template pre-processing.

I could use the panels_node module, but this creates a new node type called "Panel", and while what I want is similar, the node type already exists - and I'd need the option of creating a new node type that uses panels later.

...or am I missing something really obvious?

Any help would be appreciated.

(Drupal 7, Panels 3)

  • 1
    I'm not sure I understand what you want to do. Do you want to control the layout of some arbitrary nodes, or all nodes created from a certain date, or some other condition? – Letharion Jan 25 '12 at 16:16
  • I want the option of panelizing nodes of a particular type - that is, one type just now but that could be two or three types by the time I've finished. However I want the panelised layout to be specific to that instance of the node, as while the template is likely to be the same, the content could be very different. It's for a landing page, but one which represents a real-world object, and one which because of the way my site is structured, does have to have a node underpinning it. – Lukas White Jan 31 '12 at 16:31
5

If I clearly understand your question You want to create something like this: enter image description here

Different layout based on Node Type

  1. Go to Structure --> Pages and enable Node Template (/node/%node)
  2. There should be only one variant - go to Selection Rule. From drop down menu choose Node Type: and then choose Variant for Node Type being viewed.
  3. Create as many varants as you need for any Node Type
0

One option is to add noderef fields to your content type, which would point to the "extra" content that you want to add to each page. Your panel page would then have the node itself on it, and then a bunch of views to pull in the referenced content. We do this all the time for sidebar callouts.

0

This may not answer your question entirely since I'm not sure I understand it. Since you mention panel nodes, I want to point out that panel nodes, are being deprecated. You should not use that module, instead, you should take a look at Panelizer, which allows you to "Panelize" any node of a regular content type.

  • Do you have a reference for panel_node being deprecated? – mpdonadio Jan 26 '12 at 19:09
  • 1
    1) I co-maintain the module. 2) I wrote the initial upgrade path 3) Check the issue queue component for Panel Nodes, and you'll find that we're closing most such issues with "Please upgrade to Panelizer. 4) Panelizer is even more awesome. – Letharion Jan 26 '12 at 21:19
  • Thanks @Letharion. Panels has been pretty much rock-solid for us, so I don't spend much time in the issue queue for that project. – mpdonadio Jan 26 '12 at 21:39
  • I think Panelizer is just what I'm looking for, I'll dig around at it to make sure but I think it'll do the job. Thanks! – Lukas White Jan 31 '12 at 16:27

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.