Maybe i am still using Views incorrectly or perhaps this is just a feature request for Dr7.. but never hurts to ask.
My general philosophy in trying to turn a site around quickly is to try to have as few tpl files and theme override functions as possible. In Dr5 days my overall site strategy was make a nicely themed teaser and then user teaser views wherever possible to reduce number of tpl files required.
In Dr6 this has become blurred with the available new power of related content. By default now i almost always want to make a "fields" view because then i have access to add significantly more content to my "node view" or "teaser" by adding related content or other fields that are available to me such as eidt/delete links, etc.
This is a wonderful new feature and i would vote as the best new addition to Dr6. Only issue with this is though that i lose my node links and comments (and comment form if making a single "node view" out of fields rather than displaying a node). I end up having to resort to adding code to get these back in.
Is there a fundamental reason why i can't have the best of both worlds - node view and fields view?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | attach.png | 47.57 KB | deshilachado |
Comments
Comment #1
dawehnerso you basically need node: view as field?
Comment #2
deshilachado commentedWouldn't it be possible to use the attach view feature? First create a full node view and then attach a field view to it.
Comment #3
dawehnerbut then you couldn't use multiple nodes as view, because attachments are after/before a full view.
Comment #4
liquidcms commentedmy application at the time i posted ths was specifically for a full node (with more content) view, so perhaps #2 may be correct? Not sure what "attach a field view" refers to though, do you simply mean add a 2nd fields view with the added info and add block into $content? This is fine but doesn't let me theme very well if i need to interlace fields.. unless, i guess full node is empty and all the fields are part of the "attached" view.
Does "attach" mean something different than i am thinking?
Comment #5
merlinofchaos commentedliquidcms: A comment render requires a full node load; it is also generally a very bad thing in Drupal to have the content render for multiple comments on the same page. So indeed I've never thought to provide 'comments' as a field. It almost doesn't seem to really fit the model, as attached comments aren't *really* a field at all.
That's why it isn't really available. You can always add them yourself in theming (I know, you're trying to avoid that) via calling comment_render() yourself, of course, and that may be the solution at the moment.
Comment #6
deshilachado commentedWell, at the left side there is a possibility to "attach" a view to another view. And you can have one view as full node with comments (no fields) and a second view with fields.
Dunno if it can do what you want, it was just an idea and if in doubt better listen to the views masterchief merlin :-)
Comment #7
deshilachado commentedscreenshot got lost
Comment #8
dawehnerit is not possible to attach displays of different views :(
you could use panels to workaround this.
btw: i don't understand your last update.
Comment #9
liquidcms commentedi think maybe i started off with a bad explanation of what i am trying to do, i think a real example shows this better: http://demo1.8to13.com/family-journals
this "node view" is created from a fields view even though i am only displaying a single node, the reason being that much of the content shown here is related info pulled from content profile nodes from 3 different users, related to the primary node in various ways... wonderfully done using the very powerful relational capabilities of Views2.
but, at the end of the day, this is still primarily a view of a single node, which i need to add comments and have $links show up for, etc.
So as Eric suggested i have had to add comment_render code into tpl to get comments and various other bits that would naturally show if this were a normal node.
perhaps this is food for thought for Views3 or Drupal8 or ???, but mysql is a relational db after all, cck gives us an outlet via noderefs and userrefs to take advantage of relational db concepts, and of course Drupal's hook system, especially _nodeapi, lets us do wonderful things with nodes - how cool would it be if we could use these all together??. Views2 is really really close.. :)
Comment #10
liquidcms commentedtitle change - but could still be better.
Comment #11
dawehnerthis is defitive possible with views and panels.
Add a view to display the nodes, add a view to display the comments, and at arguments for the nid of the comments.
Then place them together at one page, for example with panels or with views_embed_view
Comment #12
liquidcms commentednot sure you are getting what i am trying to do.. it sounds like a fair bit of work putting together what you are referring to and at the end i still don't think i have node $links or other node bits that modules tend to add as i would with any std node/[nid] page.
i know i can hack together something resembling a true node view (see my url above).. the question/hope was that i could do a view to put out a single node which (without added code, panels, hacking, etc), would have any nodeapi additions that other modules tend to tack on to the node BUT, my node would have added, related info in it.
the way i have done this now i think is likely easier than what you are proposing - just use a fields view and then hack in comments, $links, etc.. although still doesn't handle things like the comment form being embedded, doesn't return to the right place after adding a comment, etc, etc.. in short.. it isn't a node/[nid] page.
thanks for the panels idea though, might be useful at some point.
Comment #13
dawehnerI think nowadays the author of the issue should perhaps use node display/display suite.
The problem with $links is that you have to load the full view, which is hard for views.
Comment #14
liquidcms commented@dereine - thanks for the update. i have briefly looked at nd and display suite but will certainly check it out again.