2 sites one serendipty installation?

Having trouble installing serendipity?
Post Reply
hammock_vienna
Posts: 1
Joined: Mon Sep 10, 2007 12:51 pm

2 sites one serendipty installation?

Post 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??
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 2 sites one serendipty installation?

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply