We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3677
    • 130 Posts
    I’m working on requirements for a ModX dev project and could use some general guidance as to whether or not my concept should be achievable in Revolution.
    I’d really appreciate feedback on any items below that don’t seem do-able.

    I’d like to have a single ModX installation that supports multiple domains resolving to a single site context.

    • A custom database would be created to define all of the supported domains (sites) and the site variables that are to be set for each.
    • A plugin would resolve the incoming hostname to a domain name key in the custom database and set all of the site variables accordingly.
    • The same set of resources are used for all domains, and the modx elements(templates,chunks,tvs) are structured such that the content is customized according to the site variables defined in the custom database.

    In order to add supported domain details there would need to be a custom Manager form:

    Custom Manager Form to Add a new site
    1. Select Product.
    2. Based on the Product listbox selection, set a few hard-coded variables and also set the list of additional user defined variables required.
    3. Enter values for the user defined variables (With validation on fields?).
    4. Go/Add Site.
    5. Upon Adding a site via the form, all values are written to the custom database with the domain name as the key.

    Custom Manager Form to Edit existing sites
    1. Select domain name from a listbox.
    2. Retrieve all current variable setting.
    3. Allow Edit of individual settings.
    4. Cancel or Save updates.

    Additional Requirements:

    • Custom DB must be preserved in the case of a ModX Revolution version update.

    Thanks,
    -Brian