Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Advice needed on using TXP for sub-sites
Hey Guys,
I would like to have some advice on the following:
I’m planning to built a website which will be sort of a mainproject-site for several subproject-sites – independent projects that will have their own little site with their own posts, images etc all in a subdirectory of the mainproject site. So something like www.mysite.com with subsequent linked, though separate subproject-websites in www.mysite.com/project1/ and www.mysite.com/project1/
Although I will largely use the same layout and templates for both the mainproject site and the subproject sites, I would like to be able, if need arises to slightly alter and change the layout/behaviour of any of the subproject-sites. (because their content can be quite different)
Also I would like the people running the sub-projects to be able to log in, and add content, but ONLY to their own project.
My plan at the moment was the make a sort of default TXP install, and set up different TXP installs, linked to different databases in each subproject’s subdirectory. Although this should be rather easy and would allow different users to log in only to their respective subproject’s TXP install… it does seem a bit much to have several databases and TXP installs running on the same server.
Also I can imagine that it would be quite difficult to for example include content of the subprojects on the mainproject’s site. I would for example want to have a list of new items on the mainproject sites deriving from the different sub-projects (as a “show on front page” sort of thing). However, this would seem to me to be rather complex if that content is actually part of different TXP installs and different databases.
Can anyone advice on what I should/could do best?
Help and feedback are much appreciated.
Thanks
Offline
Re: Advice needed on using TXP for sub-sites
You could consider having sites at www.mysite.com, project1.mysite.com, project2.mysite.com and so on. Depending on your host, you could run all of these with a single Textpattern installation with an individual database for each. The README.txt file in the TXP Sites directory explains how to do that. If that is too difficult/not possible, then multiple TXP installations, multiple databases it is.
Synchronizing TXP forms, pages and CSS between sites/sub-sites likely could best be achieved by managing them outside of the TXP database using cnk_versioning and FTP/SFTP synchronisation along with a judicious file naming scheme.
You could use RSS to aggregate content on the main project site from the sub-projects sites relatively easily. There are several ways to do that using plugins.
You can read about creating custom RSS feeds on your sub-project sites here using the aks_header plug-in. Gocom’s rah:external_output can do the same thing and is favoured by many.
To fetch the RSS feeds on the main project site, you could use aks_rss in conjunction with the Simplepie plugin for Textpattern.
As ever, there will be other ways to achieve what you want, so stay tuned.
Offline
Re: Advice needed on using TXP for sub-sites
Thanks Joe, I’ll have a good look at your suggestions. The project1.mysite.com option is indeed possible. Luckily our website host is a very cool guy that helps me out with that sort of stuff. But wouldn’t that still mean that as you are using 1 TXP install that users of project1 would still be able to post messages basically in project2? I do want the different projects to be sort of closed off from each other so that the members of project1 cannot mess about with content of project2 and vice versa.
Offline
Re: Advice needed on using TXP for sub-sites
sidekarsten wrote:
But wouldn’t that still mean that as you are using 1 TXP install that users of project1 would still be able to post messages basically in project2?
No, even though there is a single TXP installation, each of your mainproject and sub project sites has its own database and therefore its own set of users.
Offline