-
- 128 Posts
so my web context would be
www.site.com for example.
and my CSS would be /site.css
which would result in www.site.com/site.css
---
but if i made a new context called dev and I setup a subdomain so its dev.site.com
when I run that page /site.css now becomes
dev.site.com/site.css
is it possible to share the same base root? so dev.site.css having /site.css would goto www.site.com/site.css ?
Or what would be a better way to have a Main site and a TEST site (dev) where all i have to do to publish a page is drag it from 1 context to the other. ?
You could use a custom setting for the desired css_url and set it to be the same for both contexts, then use [[++css_url]]
-
- 1,145 Posts
Exactly! the value of [[++css_url]] would be absolute : www.site.com/site.css
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
-
- 128 Posts
Maybe I am misunderstanding contexts. Are they not designed for what I want to do? I want to use the same master page on both, and trigger the same addons (phpthumb) on both, but it seems like phpthumb wants access to /assets/components/phpthumb and there once again is a absolute path that gets borked in multiple contexts. I understand I can hardcode all the CSS the JS and any other absolute path, but now im starting to think maybe contexts is better suited for some other section of a site like docs, or something related but not shared. If i wanted to run a dev site and a main site, and they mirror eachother would I be better suited using Gitify and or Vapor or something like that instead? or should I just have unpublished test pages and then publish when I want to make them live.
thoughts?
-
- 1,145 Posts
Contexts do what you want, but you are talking multi domain here.
You have to copy over any Extra that cannot work cross-domain, I am talking them Extras that are heavy on server-side actions, namely phpThumb.
As for all other Extras I am sure you can explicitly declare their existing absolute paths in your new context.
I have something sort of similar; it takes me less than a second to duplicate the assets/components and core/components folders using command line
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.