Hi, I am relatively new to drupal and have only been playing with it for a month. It seems great so far and my site is almost complete.

The one thing is the front page. I am playing with the "panel" module to split it into 2 columns. The one on the left will show the latest news and update which I can do with "view" module, the one on the right I want to show the node/add/story page with the input box.

I have been trying to use Panel module but it doesn't look like I can just put in the node/add/story line into the "add post" field when I edit the panels. There is no NodeID for that page, and that isn't a block. So it looks like panel module can't just load a node based on url. I guess the only thing I can do is load it in panel using View module.

Well in View module, I can use provide page view and use full node. At first I though the URL field was exactly what I was looking for but unfortunately not. So it looks like I have to use filter it through node, but I just can't seem to figure this out.

Am I even barking up the right tree? Would this work this way? I know it might work if I edit the theme but I am really not good at css or php so Panel + View would be the easiest way to go. But is this a dead end?

Please help me!

Comments

merlinofchaos’s picture

Create a 'custom' content type. Set the input format to PHP code and use this code.

  $url_of_this_panel = 'test/panel';
  if (user_access('create stories')) {
    $_REQUEST['destination'] = $url_of_this_panel;
    print node_add('story'); 
  }

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

newdru’s picture

set the input format of custom content to 'php'?

just curious, i've been playing with CCKs lately and i don't see anywhere in the process where you can use inline php. Is there another custom content mechanism i'm missing?

thanks in advance

orick’s picture

scroll down, find "right side", click custom, find "input format"

newdru’s picture

I misunderstood the thread.

I thought this thread was about enabling CCK custom content type and assigning it to a panel. It was about creating a php snippet (custom content) in a panel.

btw..

more explicit (understandable steps) to add custom panel php snippet:

1) First ENABLE custom content on a given region in panels by clicking on "Add Custom" button (provide title if you like)

At this point you now have "enabled" custom content on a given panel region. This will attach a "Custom" "Configure" dropdown panel to set custom options on the region

2) Click on "Configure" in the "Custom"section of the region. Now you will be able to insert php (be sure to select php as input type)