Panel variants

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'nodereference_autocomplete_access' was given in /home/mnnnecdq/public_html/drupalme/includes/menu.inc on line 452.
Saturday, November 7, 2009 - 11:07

This tutorial is about the Panels module, and how you can use the Node Template to create different layouts for you're content types. For the ad-site I made, I had 7 different content types. Different fields and different field groups created with CCK had to be displayed differently when users viewed an ad. Panels 3 was just released and it's the first time I use this module for a production site.

I recommend using CCK fieldgroups when creating custom content types. When doing this you can place the fieldgroup itself in panel pane and not fields, it could save you some time depending on how many fields you have created.

1. Enable or Edit the Node Template. Click Create Variant
2. Give it a name and select Optional Features like on the screenshot
3. On the selection rules screen choose Node Type and click Add.
4. Choose the Content Type that you are creating a panel to.
5. I want the Node Autor information on my ads so I select Node Author as relationship. This will bring up the User menu when adding content.
6. Click save on the pop-up. Choose you're desired layout in the next window.
7. Click on one of the panes to add content.
8. Node menu gives you access to the CCK fields and groups. I choose to add fieldgroups to save some time. Click save on the pop-up. Override title if needed. Type <none> for no title.
9. I want user information on my ad so I add the user profile from the user menu. Click save on the pop-up. Node layout complete for this example. Click create variant. You can edit the template if you need more information.
10. Here is my live example. The site will be available in Norway december 2009. (I hope)

Comments

Add comment

The content of this field is kept private and will not be shown publicly.