Multi site extension

Gravatar drahnr

  • Posts: 34
  • Topic Created: Fri Jan 20 19:35:39 2012 +0100

I am currently digging throughout the chyrp code, but I still lack proper overview of the whole concept, which is required to extend it to render different feathers for different pages. Maybe someone already did it and knows how to properly implement it (it is possible, you see it right here) or even better has some share-able code.

Thanks

Gravatar samuellittley

Are you looking at the site code on github (http://github.com/chyrp/chyrp-site)?

Basically, if you put a twig called foobar.twig into the pages folder of whatever theme you're using, chyrp will render the twig at http://www.mysite.com/foobar

If you want to do any fancy things with this twig, such as displaying posts, you'll have to edit includes/controller/Main.php and create a method of the MainController class named the same as the twig which generates all the required fields to be passed to the Twig engine. Look at the index method that's there to see how it's done.

Gravatar drahnr

Thanks, was not aware the src code of the chyrp side was available!