I've searched through the massive amount of information on DA, so if this is a duplicate, I apologize and please forward me to the right info.

On each of my subdomains, I want to create two sets of views:
#1. views that display only content from the current domain
#2. views that show content from all domains.

I've figured out how to do this with Domain_views, but am struggling with the permissions- #2 is acting as #1.

How do I allow users to see content from other domains? And how can I make a views link to that content take them to that other domain?

Thanks for your time.

Comments

agentrickard’s picture

You can only accomplish #2 under three conditions:

1. The content is marked "Send to all affiliates"; or
2. The view is a page marked as a Special Page Request (which disables Domain Access rules); or
3. The view is set to ignore node access control -- this is an advanced Views configuration.

Option 3 can create security issues if you are using other node access modules.

To make the content link to the appropriate domain, use Domain Source, which lets you specify a canonical URL for each node. If you don't use Domain Source, the canonical URL is calculated for you.

mycrazydog’s picture

I have tried a few different settings....would you mind sharing what are the specific settings in Views, that need to be used to achieve option #3 in your list ?

Thank you

seren10pity’s picture

Hi,
I had the same issue, but the solutions above were not good for me, because I needed a view in the footer to display teasers and links to my 4 domains front pages.

Solution 1 : it made my 4 home pages available on all domains, instead of each one on it's domain, that I didn't want
Solution 2 : my view is a block that is displayed in every page, but I don't want to disable access domain rules everywhere
Solution 3 : didn't tried because of potential security issues.

Searching through the forums, I found another solution :

The only way that this filter works as you describe is to disable SQL rewrites for the View.

This option is available in your view settings, in advanced options > Query settings

I don't know what impact it may have on other filters, modules, or other cases, but for me, it worked like a charm !

Now, my view displays nodes regardless the domain they are assigned to, witch is what I needed.

I hope it can help someone else ;)

acoronel’s picture

"To make the content link to the appropriate domain, use Domain Source,"

Conversely, to make the content link to the site you are in, disable Domain Source.

Bless you agentrickard!! If you ever come to Uruguay, drop me a line I'll buy you a beer.

agentrickard’s picture

Status: Active » Closed (fixed)

Sure thing!

hanksterr7’s picture

Clarifying a bit, and then a question:

I did the "disable sql rewrites" trick and now I have this block that shows in all domains, showing content from all domains (the Domain Block module can be used to cause the block to show only in specific domains). For each piece of content that is going to show in this block, I set a Source Domain value (instead of using "Use Active Domain"). This causes the item the block to have a url that is valid.

So, if I have these sites:
domain1.example.com
domain2.example.com
domain3.example.com

And a group post "foo" is set to be published to domain2 with Source Domain=domain2, then when I view the block in any of the three domains and hover over the "foo" item, the url says domain2.example.com/foo. If I had Source Domain="use Active Domain", then the "foo" url would be domain1.example.com/foo when I am viewing the block in domain1. Since "foo" is published only to domain2, clicking domain1.example.com/foo give and Access Denied error. But if I click the same link when in domain2, the link works. So, setting Source Domain is a good thing if you want a user to be able to click a link from any domain and end up in the right domain for viewing the node!

(BTW, choosing "disable sql rewrites" disables node access checks, and I think this is what agentrickard was warning about in the original comment. So, seren10pity, when you didn't want to try solution 3 because of security concern, and instead did disable sql rewrites, you got the security concern)

I have Organic Groups and DA (and a bunch of other node access controls) in use, so I'm exploring what holes I have opened up by disabling sql rewrites for this block. So far, the only issue I see is that nodes marked "private" (or nodes in private groups that "use group defaults") are showing in the block. But if I click the item in the block, I can't access the node. So far, I'm ok with this. I can live with private content exposing its title but not anything else about it.

Ok, now the question: I would like my block to show content from a specific domain. Not all domains. I assume I need a filter in my block that specifies one (or more) domains. But I don't see any items in the list of filter options that allows me to specify a domain.

Help?

Thanks

hanksterr7’s picture

Found the answer to my question: Just install the Domain Views module. It adds filter choices to the Views filter builder that are related to Domain Access. Choose Domain Access: Domain ID as the filter option, and on the next page you will be able to select one more domains that you want your content pulled from to show in the block. Very nice!