Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Jul 2010 at 12:16 UTC
Updated:
3 Aug 2010 at 11:27 UTC
I've created a new content type which includes a URL in a text field. Using Views, I can create a list of nodes, in which the URL is rewritten into a form button (Views | Fields (Add field) | "Rewrite the output of this field").
When someone opts to view a specific node (list of 1 item), I still want to rewrite the text field containing the URL. But it has been suggested that I can not override node/%.
Presumably this means that I can't mess with default node URL, not that I can't create a new node view, and I do this by creating a new node URL? eg. /myview/node/% or /myview/%
Comments
Comment #1
dawehnerIt's just not suggested to use views for a single node. You can use node.tpl.php or panels and embed different views there.
Comment #2
iantresman commentedAny particular reason for that? Inefficient, impractical, bugs? It's just that node.tpl.php seems like a sledge-hammer to crack a nut.
Comment #3
merlinofchaos commentedThe main reason is that a lot goes on in Drupal when you visit a node. The node gets marked that you've read it, a bunch of hooks fire, and Views won't do any of that for you. Plus, with Views, you can only override *all* node views (node/%) with a single Views. That's not what people want the vast majority of the time.
If you use Panels + Page Manager (out of CTools) you can override nodes selectively, and use a view content pane and this works quite well.
Comment #5
iantresman commentedFor anyone else coming across this thread, while it has been suggested that overriding themes with .tpl templates is one solution, another one is to use the Display Suite and associated modules, described as "a visual and centralized way to handle the display of all your content, including nodes, users, comments etc."