Closed (fixed)
Project:
View reference
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2008 at 21:27 UTC
Updated:
14 Jul 2012 at 19:28 UTC
Just a question, does this module let you call default views?
Default views are used extensively in custom modules.
The thing is, those have no number and are only called by name.
Supposedly, all views should be called by name and not by number anyways.
Performance gain is one of the reasons.
Comments
Comment #1
danielb commentedI was really confused about the 'default' stuff, so I asked around about it.
According to the maintainer of the Views project, Merlin of chaos:
So I have deliberately removed the 'default' views based on this advice.
I don't know what you mean about names and numbers. Views don't really have a numbering system - I assign a number to them when you create a View Ref field, and later use the number to figure out the name of the view to show. This technique is much faster than going through the process of "discovering" views and finding one with the same name.
Comment #2
inforeto commented'Default display' sounds like some other thing.
Default views are those that modules add and can be overriden by making a new view, or be disabled.
The list of those is shown below the list of custom views in views 1.
The concern and question is related to other views issue: http://drupal.org/node/259479#comment-974175
The thing with the number is the way of calling views_get_view(), by number instead of name.
If you do load all the available views and only afterwards assign them a number then it should work fine.
Let's just make sure the default views are included, which shouldn't take much code anyways.
Not sure if views_get_view() can be used to get the list, but there's _views_get_default_views()
Those may be "special cases" but modules that add views are growing and the custom modules for client sites are even more important.
Thus adding the functionality will let everyone's views be used.
Comment #3
danielb commentedThe way the view is loaded is by name, and it is in a theme function so you can override it.
The views options are retrieved with views_get_all_views() which makes a call to views_discover_default_views() so I am confident the views provided by modules are included.
Comment #4
inforeto commentedthank you very much, i'm in the process of upgrading to drupal 6 so the new view tools will be of great use.
Comment #5
danielb commentedOK No worries
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.