Needs review
Project:
Domain Fields
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
24 Jan 2012 at 06:02 UTC
Updated:
1 Nov 2016 at 04:12 UTC
Jump to comment: Most recent, Most recent file
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | domain-fields-export-by-features-and-optimize-performance-1414994.patch | 9.31 KB | davidlfg |
Comments
Comment #0.0
alan d. commentedAdded new task to this meta issue
Comment #1
alan d. commentedComment #1.0
alan d. commentedAdded sub-issue link.
Comment #2
IcanDivideBy0 commentedIt would be nice if it is possible to define display settings for each domain.
In my case, I want an image field to display with a certain image style depending on the domain it shows on.
Comment #3
alan d. commentedYou mean http://drupal.org/project/domain_view_modes ?
Note that it is best to handle this yourself in code, but the module does allow you to automatically rebuild the domain specific displays for nodes.
Comment #4
carn1x commentedCould this module provide the following solution?
- 2 Domains: "domainA", "domainB"
- On both domains, there is a shared content type "Page", which has certain fields restricted to only show for registered users. During the registration process is a checkbox forcing the user to accept terms and conditions.
- There are separate terms and conditions for both domains: "termsA" and "termsB".
- User registers for domainA, accepts termsA and is granted "roleA"
- roleA is able to view content on domainA with access to the restricted fields for Page
- User now visits domainB whilst logged in, and views a Page, and because they are in roleA, they have permission to view restricted fields, however they have not accepted termsB, so they should not be able to view restricted fields.
Does that make sense?
Comment #5
alan d. commentedPartially
This module provides a way to restrict access, so it will hide fields based on the domain. However the rest of this is up to you.
1) Handle the users role during sign-up. There is a million modules out there that handle this in different ways, I done a very old comparison here: http://drupal.org/project/rolekey (this was a module that I dropped after a proliferation of other similar modules). I would use rules & actions.
2) Write your own field handling. See http://api.drupal.org/api/drupal/modules!field!field.api.php/function/ho...
Or just finish off the entire process yourself.
Comment #6
mrryanjohnston commentedIs there any chance that we can export these settings into features in future releases?
Comment #7
alan d. commentedI'm happy to help get patches into the module, but I would only do this myself on a need to basis which would not be in the foreseeable future.
Comment #7.0
alan d. commentedTask two completed and committed and updated the meta list.
Comment #8
ridfa commentedThanks for this usefull module.
Would it be possible to administer a different field value for each domain, such as name.domain1 has a value 1 and name.domain2 has a value 2.
In this case, the same node ID would show differents values for the same field, depending on a domain rule.
Maybe is there a drupal way to administer and display this, in code or with a module ?
Comment #9
alan d. commented@ridfa
I will read this as a support request. Best to start new threads for these :)
Skip access, it would probably complicate things. Try something like this:
Comment #9.0
alan d. commentedUpdate
Comment #10
dchalmer commentedAlan, just a quick thank-you from me. Domain Fields was the perfect solution to my problem - how to display the same news story on two domains, but displaying a different "News category" heading for the story on each domain... so, in the template for the content type:
And in my Views it's even simpler: just add both fields to the list to be displayed, your code ensures only the one for the current domain is displayed.
Thanks again!
D.
Comment #11
alan d. commented@dchalmer
Thanks, glad you found it useful :)
Comment #12
mas0h commentedThis module doesn't support views, all restricted fields are showing under all subdomains! any suggestions?
Comment #13
alan d. commentedThat would probably suggest a security issue with views, but by design if you are caching the results in a non-domain aware manor.
Comment #14
davidlfg commentedAttached a patch proposes two improvements:
1- Support Exportables / Features.
2- Change the variable table for other structure, retaining all the same logic. I think it is really important because Drupal, query the table Variable by each request and In some cases one project a project might contain many Domains.
Any comment is appreciated!