Administering Multiple Sites with one Fuel CMS
Hello,
I currently have 4 websites currently written in other languages and want to rebuild them in PHP with a CMS back end written in the same language.
How can I use Fuel to manage multiple sites, allowing multiple users to add content independently
Comments
Thank you for replying. I had to come up with a solution other than multiple installs of fuel since the development of the other sites are well under way. I decided to divide the features I wanted to administer across all sites then set off to see how Fuel could be used to get it done on a per site basis.
One of the first was product categories. What I need, I thought, was a way; a simple module ("Categorymger"),
which would display a dashboard with options(s) which would allow me to select the site,(category table) I need to administer.
selecting an option would cause, the Categorymger_model() to get passed a variable corresponding to something like; parent::__construct( $db. 'categories_table');
If this works I want to do the same for products as well as inline editing of site pages.
Still I await any response to this idea
$config['modules']['sites'] = array( .... 'filters' => array( 'site_id' => array( 'default' => 1, 'label' => 'Site', 'type' => 'select', 'model' => 'sites_model', 'hide_if_one' => TRUE, 'first_option' => 'Select a site...', ), ...
Each site will have its own category table. The aim is to load and modify categories for a selected site, doing things like disabling or activating categories.
This is what I have so far:
1. a simple categoryManager module complete, activated and showing up in the dashboard left nav
2. click categoryManager shows a list_view of categories from a default site. The default site was selected from a query on the sites table, then using the site name value to prefix the table name passed to the module:
function __construct()
{ $sites = $this->getSites();
parent::__construct($sites->{0}->name.'categories');
}
... now, the challenge is:
- pass the sites list to a dropdown in the list_view page (could be hard coded)
- onchage this dropdown, pass a different prefix the the construct, or reload contents of the the list_view page with categories from the selected site using a jquery plugin like tableSorter.js.
I am still not sure this is the best way to do it but I take any advise and update my progress here
http://docs.getfuelcms.com/general/javascript