1

How do you create a panel for a url that looks like product/%nid/title.

  • The Title should be from the node.
  • The node paths have already been setup with pathauto.

What i have so far in my panel arguments

The panel doesn't get used on the page

  • I don't think you understand what you are asking. Using arguments, such as %node, is about providing context about what we are displaying, usually by loading data from the DB. %node/%title, then, doesn't make sense, unless the title is the title of something other than the node. What's the problem with my answer recommending Pathauto? – Letharion Aug 22 '13 at 17:07
  • The title should be the one from the node. I want to use the panel to change the layout. Should the title come from panel context then? – sasdev Aug 22 '13 at 17:23
1

Separate answer. The original one still contains useful information, so I don't want to edit/remove it, but it doesn't answer your edited question.

I believe you are confusing "What the end users sees in the address bar", with "How Drupal internally handles URLs". Those are often not the same.

In your Panel page, you don't need to include the title argument at all, whether the title is part of the shown URL or not is a problem for Pathauto to handle. Page manager only cares that it's a node that is being displayed, so internally it uses the path node/X.

So the simple answer is, just use the already provided default "Node view" page, and you'll be on your way.

  • This explained it clearly for me. Worked on the first attempt. – sasdev Aug 24 '13 at 8:41
1

I'm not sure what you are after. You just want the URL to look right, then all you need is Pathauto.

What you are asking however, is essentially how to tell Page manager to load content based on the title of the content. That could make sense, if it wasn't because you already load it by the ID, so loading it again would just be redundant.

If that's really what you want though, here goes:

Page manager doesn't know how to load nodes by title, so you will need to explain to it.

This is a called a Context.

See What are Ctools plugin (content type, access, etc), and how does one create them? for the basics of how to implement a ctools plugin. Look at the existing contexts in the ctools examples directory, and creating the context shouldn't be to hard.

  • I want to override the path with a panel. Even if the title is not included in the url. – sasdev Aug 22 '13 at 16:16
  • I can't reconcile that statement with what you are asking in your question. Perhaps you should back up a bit and tell us what you want to happen, and skip over the technical issues. – Letharion Aug 22 '13 at 16:28
  • The question has been updated to make more sense. (hopefully) – sasdev Aug 22 '13 at 16:41
  • Apologies. My Question was not asked clearly. Made some more updates. I am not familiar with context yet. Will mark this question as correct if I get it working with contexts. – sasdev Aug 23 '13 at 13:02
  • Alright, I've made another attempt at answer the newly phrased question. :) – Letharion Aug 23 '13 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.