If necessary, you could have the HTML contain a superset of what's
needed for individual versions of pages, then use CSS to show/hide
things appropriately.
That would greatly simplify it.
Cheers,
Chris
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to rails-...@googlegroups.com.
> To unsubscribe from this group, send email to
> rails-oceani...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=en.
>
Could you do the customisation entirely in CSS?
If necessary, you could have the HTML contain a superset of what's
needed for individual versions of pages, then use CSS to show/hide
things appropriately.
That would greatly simplify it.
It is not difficult to extract the subdomain from the request (say at the application controller level or in a before filter) and then apply a different layout based on the subdomain. That would give you a fair bit of flexibility for customisation.
Are you just trying to allow a tenant to customize the look and feel?
--
You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rails-oceania/-/rQwQ_U2OkcIJ.
It may or may not be the right approach for you, but we're beginning to use liquid templates for custom views per-subdomain in a multi-tenanted app. Maintaining a separate set of views for each subdomain doesn't scale well.Check it out here: http://www.liquidmarkup.org/
The simplest way IMO to set up a directory for each subdomain/account (under public/) to which the client can upload any css/image assets their template requires - or buckets on S3 if you're using heroku. If you start this way then it clears the way for you to allow clients to manage their own template assets later on down the track.
I did something similar recently, but based on domain rather than
subdomain. Either way it's easy to add a load path that's based on the
domain, so views can be overridden on a per site basis.