Page 1 of 1

2 sites one serendipty installation?

Posted: Mon Sep 10, 2007 12:58 pm
by hammock_vienna
Hi,

i would like to integrate my blog content into my homepage, so i would need a second template with less functionality. Since i don't want to add a second serendipty installation + content synchronization (uaaahhh) how could i do it?

Summary
2 websites
2 templates
Different Plugins should be shown depending on the website
same content

Anyone done that before??

Re: 2 sites one serendipty installation?

Posted: Mon Sep 10, 2007 1:04 pm
by garvinhicking
Hi!

Hm, it's very unusual for the SAME content to have two different templates.

This can be done with serendipity, but you'll need to write your own plugin that sets the right template ($serendipity['template']) depending on your $_SERVER['HTTP_HOST'], listening on the frontend_configure event hook.

You could also do it with serendipity's own stuff by using the plugin "Extended properties for categories" and the "Show/Hide sidebar" plugin. Then you create a category "Webside A" and "Webside B", and then you assign all your entries to both categories.

Now if you call http://yourblog/categories/WebsideA you will get the template you set for Category WebsideA, and the other template for /categories/WEbsideB. Using the sidebar hider plugin you can then show distinct boxes for specific categories only. Finally, you can setup custom mod_rewrite rules to forward people to the proper category URL depending on their main host URL.

Regards,
Garvin