Active
Project:
Domain CTools
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Nov 2010 at 23:58 UTC
Updated:
9 Aug 2013 at 16:06 UTC
I have been looking through the modules and the issue queue for something that provides a "current domain" context through ctools. I have not found anything yet.
Before I begin writing a context plugin, is there a compelling reason why one shouldn't be created?
Thanks,
Noah Lively
Comments
Comment #1
agentrickardNo reason at all other than time. It should be a patch against this module, though, which is split off from the main module for faster development.
Unless Domain Ctools actually has what you need, which I doubt.
Current domain is a global value that most things are sensitive too, so I don't quite now what you would gain with a Ctools context. There is also a context module plugin. http://drupal.org/project/domaincontext
Comment #2
noahlively commentedPanels selection rules was the application I wa thinking of.
Comment #3
agentrickardI don't think I have messed with that. Take a look at what Domain CTools provides, and patch against HEAD as needed.
Comment #4
noslokire commentedI needed the same, however if you have the Token module installed, which most do, you can use the Token context and make the identifier "Domain" and the Keyword "domain" and magically the domain variables appear.
I used the %domain:domain-subdomain-raw to get the sub-domain name
Comment #5
agentrickardI suspect that is the proper solution, yes?
Comment #6
neilnz commentedI think it would be neater to have a proper context plugin for this.
My use-case is that I use the panels cache, with context-based granularity, with the same panel on different domains. Inside the pane are views that are domain-sensitive, so when the panel caches on one domain, it caches then spits out the wrong view content on the other domain...
Tokens are a bit of a hack...
Comment #7
agentrickardThose are two different issues, really.
Patches welcome.
Comment #8
agentrickardBumping
Comment #9
rogical commentedReally need this!
Comment #10
jwilson3Following the instructions in #4 no longer works the same way in D7 because you'll end up with tokens that look like %domain:current-domain:subdomain, etc.
For Drupal 7, I suggest adding a Panels CTools context of type Token, with Identifier: "Site" and Keyword: "site", and you end up with tokens like %site:current-domain:subdomain, %site:default-domain:subdomain, %site:current-user:name, etc.