Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » How I can make 3 site view with 1 database

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1126 Views
  • fiord
    Avatar
    Community Member
    79 Posts

    How I can make 3 site view with 1 database Link to this post

    how to use one database for multiple patterns simultaneously?
    I will be in the 1 site to showcase my designed templates
    How could it be implemented?
    I think I can help
    ?theme=mysite1&flush=1
    ?theme=mysite2&flush=1
    ?theme=mysite3&flush=1

    but what I write in _config.php instead
    SSViewer:: set_theme ( 'askold');

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: How I can make 3 site view with 1 database Link to this post

    Well its basically like how the current theme preview system works - its sets the theme name in the url. So exactly how you have done will work you just need this in your _config file.

    Check to see if theme is set otherwise default to 'askold'

    // in mysite / _config.php
    $theme = (isset($_GET['theme']) ? $_GET['theme'] : 'askold';

    SSViewer::set_theme($theme);

    1126 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.