I have a question and was wondering if I can accomplish this with MODx or not.
I have a project, it is going to be 6 websites managed by MODx. I know I can do this with contexts. But the kicker is a special thing they want. They want to add a "Service" and that service would appear in all contexts, but they only want to add it once and edit it in one place. So is their a way to add a Resource in the "web" context and have it duplicated or accessible in the other contexts?
So if it is in the web context it would be
www.domain.com/service
but they also want it to show up on the others like
www.domain1.com/service
www.domain2.com/service
Is this possible? I did some research on the ’Babel’ Add-on and it seems like that syncs resources so you can edit the english resource and it will make that modification to all the resources in different languages in their contexts.
Please let me know, this is killing me.
I am using the latest release of MODx 2.0.7
I’m not sure. I think it would depend on what the "service" is. If it’s just a web page, I would think Symlinks would do it if they work across contexts.
Worst case, you could make that page have just a snippet tag on it. The snippet could generate the appropriate output depending on the referer or it could pull in the content of an unpublished resource (with context-appropriate trimmings). Snippets are shared across contexts, so that should work, but I’ve never tried it.
I am testing it out with Symlinks but it does not seem like they work cross-contexts.
Maybe a Weblink with the full context URL would work.
In a sense it works but it just goes to that page so you aren’t within that context any more because the weblink takes you to the other context.
You really would have thought that allowing you to create multiple contexts that they would have allowed you to share resources between them.
Quote from: landonpoburan at Jan 21, 2011, 07:10 PM
In a sense it works but it just goes to that page so you aren’t within that context any more because the weblink takes you to the other context.
You really would have thought that allowing you to create multiple contexts that they would have allowed you to share resources between them.
What happens when you try simlinks? Page not found? That might suggest that the current user doesn’t have permissions for the other context.
You may have to just stay in the context and use getField to pull in the content field from the other resource (or use a chunk for the shared content).
Maybe there’s another way the I’m just not aware of.
But why would someone viewing not have permission? I can view any other page in that context but not the symlinked one.
You can view it here:
http://staging.categorycode.ca/3
For some reason that context is giving me issues and not letting me view:
http://staging.categorycode.ca/contact but will let me view it by id:
http://staging.categorycode.ca/4
But this is the symlinked one:
http://staging.categorycode.ca/5
Nevermind its working again.
But hen I click on the link to the symlinked page it takes me to:
http://staging.categorycode.ca/about-us
but its a 404. Do you think that it is a permission issue? How would I check that or change that?
Does that page (5) belong to any resource groups?
Do you have a Context Access ACL entry for the anonymous group giving them access to that context with a policy of "load, list, and view" ?
It isn’t part of a resource group.
I went into ’annonymus’ user group and added context access to the ’staging’ context with load,list,view but still seems like a no go.
http://staging.categorycode.ca/
If you go there you can see how you can view the first to links but not the 3rd.