Apologies if this is discussed elsewhere. I've done a fairly thorough search and can't find any mention of this issue.
My Views page has a path of /care/surgeries/%
My Views argument is Node: Nid.
The argument is set to use the default argument 'get node id from url'.
If I go to http://dev.astonhealth.com/care/surgeries/18 my View loads complete with node reference and attachment.
However, if I use the path as defined through path module http://dev.astonhealth.com/care/surgeries/bull-farm the CCK generated page loads instead. Shouldn't the default argument 'get node id from url' intercept the path and open my View?
But this is where it gets funky. If I use the path module to change the path to '/care/surgeries/18' and go to that url now the CCK generated page loads instead of the View.
So, how can I get all my nodes of type surgery to display using Views and path - care/surgeries/%?
My View is attached if that's any help.
| Comment | File | Size | Author |
|---|---|---|---|
| surgeries-views.txt.zip | 2.84 KB | jamesbisset |
Comments
Comment #1
dawehnerViews does not "know" of anything like patch module. It uses the internal path of drupal.
I'm not really sure, do you have a path alias from /care/surgeries/18 to care/surgeries/bull-farm ?
If yes, it should work, else you need a path alias, or you can use a argument which uses the "bull-form"-field.
Comment #2
marcnewport commentedI'm getting this problem too, did you ever sort it out?
Comment #3
jamesbisset commentedSorry, the site went live and the issue got erm... filed. :)
@ Dereine: The path-auto module is set to create an automatic alias for all surgeries - ie /care/surgeries/[title-raw], where [title-raw] is a replacement pattern.
If Drupal can display the correct node when the url passes the alias, then Drupal must know the nid (ie the internal path). It's just that the page render wasn't being handed off to Views unless the nid was explicit in the url - or at least until the alias was also the nid!
Anyway, it's water under the bridge now. The site is live at http://www.astonhealth.com/ and there seem to be no problems with /care/surgeries/18 versus /care/surgeries/bull-farm. You can tell, because the PCT information and the Medical Staff list are both displayed using Views Attachments. If they're not there, then it's not a Views page.
I'm beginning to wonder if it was some sort of caching issue, resolved when the completed site was copied over to the public server?
Comment #4
merlinofchaos commentedOriginal request seems to have been fixed, then.
Comment #5
merlinofchaos commentedActually, I'm re-reading htis issue and I think there is a serious misunderstanding of how the provide default functionality works. In general it's meant to be used on non-page views that cannot take their arguments from the URL. You are talking about a combination of a page view and pathauto.
Pathauto is turning
/care/surgeries/bull-farmintonode/18and the view never gets it. That's the whole purpose of pathauto, which is to provide aliases for nodes.Which explains why when you changed pathauto, the behavior appeared to change, because pathauto still changed it to node/18.
It sounds like what you really wanted to do was have Views override the 'node' page for a particular type of node, and Views doesn't actually do that. Panels + Page Manager can do that, though.