Hello,

I'm trying to make easier the process of creating content on my website.

I want to create a node and to display it automatically in an existing panel when its workflow state changes from one state to another.
At the moment, when the node is created, i'm redirected the "panel content" page (using Rules) to add the mentioned node using "Add content -> Existing node". I then need to set the right options (always the same settings in my case but not default, i don't want them to be default), save and move the node within the panel layout and save the whole thing. Which is way too complicated for most of us.

I want to make the process easier by firing the redirection, calling some php code with Rules which add the node just modified (Rules can give me the node variable) to the "panel content" page i was redirected to with the correct settings. We would just need then to drag and drop the node with the layout and save.

I think it should be possible to do that because i have access to all variables i need :
- id of updated node
- id of panel which must contain the node
- form id : ctools_node_content_type_edit_form

Could someone give me some info on either it's possible or not and how to do it ?

Thank you !

Comments

merlinofchaos’s picture

Status: Active » Fixed

I've had to reread this a few times to try and understand it. I feel as though I am missing a few pieces. Some questions I have that I am going to make assumptions on:

1) What's on the edit page that you're addng the content to? A bunch of nodes? Is this page just accreting content as you create new nodes? Or do you remove old content? Or is it always just one node?

Actually in almost every scenario I can think of, it sounds like what you *really* want is a view, which shows all of the content that is supposed to be shown. Figuring out what content is supposed to be shown could be tricky, but using something like nodequeue (and you can use actions and I think rules to automatically add nodes to nodequeues) or flag (similar) or probably some other similar modules to put new nodes into the list of content that will automatically be displayed.

Beyond this it's hard for me to give more advice.

blouhwtf’s picture

Hi Merlin,

Thanks for replying to this.

You are right when saying that it looks like a view; creating nodes and displaying them automatically on a page just like views would do.

In fact, i wanted to be able to use that principle with panels (creating nodes that would be added automatically in a 2 column panel-layout so that the creator of those nodes just needed to drag and drop them in the region they wanted in that panel).
The problem was that the process of creating a node, going to the panel that should receive it, click add content, find the node and finally drag it in the right region was painful, so i was thinking about automating things. After creating a node of a certain type, redirecting the author to the panel that should display it and inserting the node automatically in a region (whatever) with the right settings, so that the user was able to just drag and drop it where he actually wanted to place it in the panel.

So if i try to sum it up: the key thing here, i guess, is that views would not allow enough flexibility to position the nodes it listed, so i have to use panels layouts for that. Let's say i want to create a "Service" that would be inserted in a "Services" panel, i want that very service to be in the second position in the left column but the previous one i added, in the first position of the second column, that's the spirit of the question. I was trying to think on how to be able to do that painlessly, knowing that the panel will only use "Service" nodes, so it makes it "easier" i guess.

Hope it is clearer.

merlinofchaos’s picture

I think you definitely should investigate nodequeue module. You can use that to handle positioning in a list very nicely.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kopeboy’s picture

Version: 6.x-3.5 » 7.x-3.x-dev
Issue summary: View changes

Nodequeue lets you position something in a list. Panels content UI (or even better IPE) let's you drag&drop to different regions while actually viewing how those regions will display.

I am looking for this functionality as well, since the "Add existing content/node" in Panels is not very user friendly.
It would be nice if we could add a node to a panel region with Rules.

Using Views can be robust but doesn't give much flexibility to the content editor, and it's also harder to understand and manage since you will be looking at "View: primary article" "View:secondary article list" Pane titles instead of "Node: title of the article".

Imagine you are building a newspaper front page..

kopeboy’s picture

Status: Closed (fixed) » Active