At: Content -> Add Content -> Existing Node, one receives the following instructions:

Enter the title or NID of a node:

To use a NID from the URL, you may use %0, %1, ..., %N to get URL arguments. Or use @0, @1, @2, ..., @N to use arguments passed into the panel.

There is no mention here that if you want to use a node id you have to do it like, "[NID: 2016]" where "2016" is a particular node id. The user shouldn't be expected to guess at the syntax and a simple example would make it so much clearer.

Thanks for the awesome module,

Shai Gluskin

Comments

merlinofchaos’s picture

You don't have to use that syntax, though. That syntax exists to differentiate multiple nodes with the same title, but it's really for the autocomplete.

If you just enter 2016, it should get that nid and add it.

Shai’s picture

@merlinofchaos, wow, it works!

I guess the issue then is UI consistency across different Drupal core widgets. With straight text autocomplete, if the widget doesn't find anything, you've failed --> no match. If I just type the nid in, no feedback, so I (wrongly) assumed no match. If I type in [nid:2016] I do get the feedback. So ideally, just typing in the NID would also get you the same feedback.

But I realize this is quibbling... So don't let this distract you! You do awesome work. Thanks for the response.

best,

Shai

merlinofchaos’s picture

Status: Active » Closed (works as designed)

I'm not sure the widget could autocomplete nids, though, which is what that would require, so I don't think that can happen. I do see what you mean, but alas, it's not going to work that way.

Shai’s picture

@merlinofchaos: Have you noticed that the widget WILL "autocomplete" by showing the node title when you put a node id in the following format: [nid:2016]. I thought that was the intended behavior and so I thought you just forgot to include the required syntax. That's why I filed the issue.

So I would advocate for one of two possible solutions, both of them help-text solutions. Replace the current, "Enter the title or NID of a node" with one of:

1. "Start to type the title of the node and the autocomplete widget will find a match. OR just type in the node number and Panels will find it."
2. "Start to type the title of the node and the autocomplete widget will find a match. OR type the node id like this, replacing 'x' with the node id: [nid:x]."

Shai

merlinofchaos’s picture

Status: Closed (works as designed) » Active

That's might be a bit wordy, but yes, adjusting the text to try to be clearer makes sense. Let's see if we can crowdsource this into a decent piece of text.

Shai’s picture

[I created a duplicate comment] -- so I'm zeroing out the repeated content. An admin who has perms to delete comments should delete this one. Sorry.]

Shai’s picture

Yes, crowdsourcing is a good thing. While we are waiting for the crowds to assemble, here is a less wordy alternative to throw into the mix:

Enter the title or nid ("[nid:x]" replacing "x" with the nid)

It occurs to me that just typing in the nid should be an "undocumented feature." Undocumented features are usually undocumented for a reason and not because the document writers ran out of steam. In this case, the use of the feature breaks the expected UE of the core autocomplete widget, and therefore should not be officially documented.

Shai

merlinofchaos’s picture

Maybe, but it's a very handy feature. My experience has been that people using this interface are quite capable of looking things up by nid and really want that feature to be there and available, so I think undocumenting it would be a bad idea (or making it seem harder than it is would also be a bad idea.).

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Based on #8 I am won't-fixing this.

roynilanjan’s picture

Can you please give an example to use that syntax exactly? I don't want to hard-code the node id
I have two argument in panel like path pagetest/!node1/!node2

roynilanjan’s picture

Version: 6.x-3.5 » 7.x-3.3
Status: Closed (won't fix) » Needs review

@merlinofchaos - can you please give me an example to configure it as @1,... @N or %1,... %N from existing node configuration pane instead of hard-coded node id

merlinofchaos’s picture

Status: Needs review » Closed (won't fix)

This issue is not an appropriate place to ask for an example.

In addition, the @ and % syntax are discouraged. You should use arguments where possible.