Replacing nodes of a certain type with a Panel

drupalshrek - November 3, 2009 - 14:38

I want to replace my nodes of a certain type ("My Node Type") with a Panel which includes these nodes. So, within the panel I think I need to set the path to “node/%”, so that the node/3, node/4, node/5, . . . pages will be replaced by this panel,
and the argument % will be passed to the panel.

Unfortunately, I get the error message:

You cannot have an unnamed placeholder (% or ! by itself). Please name your placeholder by adding a short piece of descriptive text to the % or !, such as %user or %node.

I've also tried "node/%node" as the path but I then get the following error message:

That path is already in used. This system cannot override existing paths.

Any ideas? Thanks!

Which version of panels are

nevets - November 3, 2009 - 15:57

Which version of panels are you using?

Panels 6.x-3.2

drupalshrek - November 3, 2009 - 15:59

Hi,

This is my Panels module setup:

Enabled Throttle Name Version Description

Mini panels 6.x-3.2 Create mini panels that can be used as blocks by Drupal and panes by other panel modules.
Depends on: Panels (enabled), Chaos tools (enabled)

Panel nodes 6.x-3.2 Create nodes that are divided into areas with selectable content.
Depends on: Panels (enabled), Chaos tools (enabled)

Panels 6.x-3.2 Core Panels display functions; provides no external UI, at least one other Panels module should be enabled.
Depends on: Chaos tools (enabled)
Required by: Chaos Tools (CTools) Plugin Example (enabled), Mini panels (enabled), Panel nodes (enabled), Bonus: Panels (enabled)

Visit Administer → Site

nevets - November 3, 2009 - 16:24

Visit Administer → Site building → Panels

In right column (of main content area), under "Manage pages..." next to "Node template" click "edit".

On the next page click "Add variant"

Fill in title and check "Selection rules"

Click "Create variant"

For select rule chose "Node: Type" and click "Add"

In the popup select your content type and click "Save" (I then had to click "close window").

Click "Continue"

Select the layout you want

Click "Continue" then "Create variant"

Add content to layout as desired and save.

Just what I was looking for

BrightBold - November 5, 2009 - 15:05

Thanks Nevets. There's not a lot of documentation yet on Panels 3 (or it's mostly geared towards people already familiar with Panels 2) so this was perfect.

Thanks!

drupalshrek - November 13, 2009 - 14:04

Hi,

Thank you for your help.

I managed to get it working, thanks to your help, and also http://drupalfun.com/content/converting-panels-3

The secret was to enable the system supplied "node view" (/admin/build/pages) which already defined the path /node/%node and set the selection rule to "This panel will be selected if Node being viewed is type "User Profile"."

Thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.