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

agentrickard - July 26, 2008 - 02:37

I haven't played with the Views code very much, so I'd be happy to look at any improvements.

#2

Garrett Albright - August 29, 2008 - 20:44

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

nonsie - August 29, 2008 - 22:53

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

Garrett Albright - August 29, 2008 - 22:56

Rebuilding views is fine; I just have one (so far) anyway.

#5

nonsie - September 1, 2008 - 22:17

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!

AttachmentSize
domain_views.views_.zip1.51 KB

#6

Garrett Albright - September 4, 2008 - 15:24

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

nonsie - September 4, 2008 - 16:56

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

agentrickard - September 4, 2008 - 23:08
Version:6.x-1.0-rc5» 6.x-1.1

Moving to 6.x.1.1. This one is up to the community; I can release the best solutions.

 
 

Drupal is a registered trademark of Dries Buytaert.