Domain Views - adding support for domain_site alias
nonsie - July 25, 2008 - 22:44
| Project: | Domain Access |
| Version: | 6.x-1.1 |
| Component: | - Domain Views |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
When I first ported Domain Views to 6.x version I just used what was there in 5.x version. However only allowing Views access to data that contains domain_id realm is somewhat limited. The workaround of using -1 for domain id to get nodes for all enabled domains is very limited. It does not work in situations where you'd like to get nodes for all (domain_site) or current (domain_id realm) domains.
I've modified it for my own use to allow domain_id and domain_site grants for filters/arguments but I'm not sure if this is something everyone would need.
Ken, any feedback?

#1
I haven't played with the Views code very much, so I'd be happy to look at any improvements.
#2
nonsie, your tweaks may be able to help me with a similar issue (I think; I don't totally follow your terminology) I'm having here. Do you think you could share your modifications, please?
#3
If you can wait until Monday I can upload my version of Domain Views. It separates domain_id and domain_site grants - eg. there is no easy way to upgrade from current DA Views to mine. You'll need to re-save each view that uses Domain Access in its filters.
#4
Rebuilding views is fine; I just have one (so far) anyway.
#5
I just realized the version I'm using on the site only has "current domain or all domains" filter (eg. content published to current domain or to all affiliates). You could easily expand this into similar selection that exists for domain_id grant.
I know I have a version somewhere with all different DA grants but I haven't yet located it:(
Unzip the attached file into your domain_views folder, the file should be named domain_views.views.inc. Make sure to test this out on a dev site before you apply it on the live site!
#6
You're right in that the option wasn't where I expected it to be, but once I found it and selected it, everything seems to be working just as we wanted it. Thank you.
#7
In the light of Views API change (hooks_views_api()) I propose getting full domain_site grant based views into DA once new version of Views will be released (which will happen once at least CCK is ready for it)...
Perhaps we should make this thread about what everyone wants out of Domain Views while we wait for the next version of Views?
#8
Moving to 6.x.1.1. This one is up to the community; I can release the best solutions.