Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Dual Saasy and non-Saasy defaults

edited July 2013 in Apps

I'm struggling a bit with how to do the following in a Saasy context:

The main site is at www.example.com. The 'index' page at www.example.com/ for guests is a general site landing page using Twitter Bootstrap (it's all Bootstrap), with some additional pages on the main site for public-facing data.

A saasy-managed customer can signup from either www.example.com/user/signup or customer.example.com/user/signup, and login from either www.example.com/user/login or customer.example.com/user/login. If a member has related customer account(s), and they login at www.example.com they can select to enter a customer account from www.example.com.

All customer-generated content and customer members are managed on dynamic, data-driven pages at customer.example.com, which have a saasy-specific layout.

So, two default layouts -- one for www.example.com\* pages and one for *.example.com\* pages -- and a special layout for the 'default' landing page at www.example.com. Plus two slightly different signup/login interfaces.

I think this is doable within the context of the current saasy app and the current configuration options, but damned if I can figure out the right mix of default handlers, default layouts, custom handlers and layouts.

Any help is appreciated with this one.

Comments

  • I would probably just add something to bootstrap.php that looks at HTTP_HOST and REQUEST_URI and sets the appropriate layout.

    If you default to saasy, you could do something like this:

    if ($_SERVER['HTTP_HOST'] === 'www.example.com') {
        $page->layout = 'mainsite';
    }
    

    Then if you edit the index page, you should be able to select the layout to use for that under Extra Options.

Sign In or Register to comment.