Quote from: CwnAnnwn at Jul 04, 2010, 02:28 AM
I have been experimenting with the assets_url context setting to point that to the default system assets location that is used by the package management system. Unfortunately I haven’t yet figured out what that value is supposed to look like. e.g. site.net (physically at /home/site/)with assets at http://site.net/assets (/home/site/assets/). For my.site.net (physically at /home/site/my/), what should the assets_url, or assets_path setting be?
I would like to understand the subdomain processes so I can determine if I can perform the task of setting up subdomains without having to modify every single element to point to a custom setting.
You are pioneering a bit here, but obviously, the Extras you choose to use have to be Context-aware to be useful in these situations.
Look at the default values for MODX_ASSETS_PATH and MODX_ASSETS_URL (these are your global defines that are set in the configuration). PATH refers to the absolute physical path on the filesystem where the directory exists, and URL refers to the URL that would access it (not including the scheme/domain, e.g. /assets/). But you have to remember that this URL is also relative to your current virtual host. This may not be what you want, and in our case, we chose to create our own system setting to manage web-accessible assets in a specific subdomain. With most Add-Ons, installing them in the main domain will simply provide a few web accessible default CSS and JS files that are meant only for demonstrating how to customize the markup and styling yourself using the typical Chunk (or file-based) tpl properties that most Add-Ons utilize. More complex Add-Ons will of course be the challenge.
We’ll have to establish a set of best practices for building multi-context capable OR single-context targeted Add-Ons for MODx as we move forward. These are new and unique challenges for new and unique features in Revolution, so these are certainly not well established yet.