-
-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use-cases for multi-site functionality #1132
Comments
At first allow me to say you guys are genius. But relevant to subject I should say in my opinion the multi site feature is one of the most applicable feature that can be extended because of brilliant modular capabilities of Piranha. Lets suppose I have created an IndexPage as a Model and I want to use it in my sites which all of them have it's own Layout. There must be a way to specify the Layout in each individual Instances of my IndexPage which can be achieved simply by a StringField in my Model. Far better than that I can create my own SelectLayoutField derived from IField and use it as IList<SelectLayoutField> in each instances of sites OR as a SelectLayoutField in Pages . |
Sharing assets and media between the sites is also annoying because each site is supposed to have it's own private assets and media unless the administrator want to share them between specified sites. |
@MehranDHN Exactly, this is the whole purpose of this discussion. When we designed the multi-site feature back in the days the use-case we were trying to fulfill was:
The feature was never intended to support multi-tenant behavior, in fact, like you mention the architecture does not support this. What we'd like to see is what use cases you are using it for and if it is the above use cases, could we support them better or maybe do it in a different way. |
i will be using it soon.. and i had some questions which mehran already answered. Can different sites use different layout / theme ? |
@ksahmed Like we've already mentioned in #1131 Piranha is not multi-tenant. I am not in any way objecting to the fact that Piranha lacks lots of features for multi-tenant setup as it is not intended to support it. The multi-site feature has always been intended to be used by a single tenant. As far as using different layouts goes you can do this in a number of ways. For example:
|
i didnt talk about multitenancy . :) |
I built a site in 4 different languages using Piranha and I found the 2 following features missing:
For the first one, I ended up adding a PageField in every page type (through a base class) to link to the canonical page. Then I registered a hook on the page save to maintain a class, which, given the Id of the canonical page return the id of the alternates page. For the second one, I had to add fields in the page type to compensate, which is more work and not really satisfactory for my users. And BTW, the preview not honoring the siteid of the page is troublesome (see #335) |
@vjacquet I totally understand. Now Piranha isn't a multi-lingual framework, it just has support for multiple sites. But like you say, one of the use cases for using multiple sites is to have translated versions of the pages. This comes back to the main question here. When using the multi-site feature for this, is this a good workflow, or could one think of a better one. For example, if we were to define the available languages (which would be needed to solve your second issue), would it be better to just create a translated version of a page in direct conjunction to the original page. This workflow would mean that you would have one sitemap where pages could have different language versions attached to them. With this workflow it would be easy to open a page and then just switch between the different language versions of it instead of going to another site. Or is it better to keep them separated and continue using multiple sites for this use-case for other reasons? Regards |
When working on multilingual sites, the client often start with what we need is "1 page, n translations" but, on the long run, sites often needs to evolve independently, because you need to publish immediately a page not translated yet or you need to publish some pages only for one country. So I think media and pages should not be handled the same way:
But, what I am starting to realize is that the translated page may or may not be in another site.
If you handle this case, you may start with one site and, when needed, move towards a multi-site scenario. |
I would go for this. Having a page which can be translated, instead of having to setup multiple sites. We could then have pages which are translated already to different languages, an others which are still not yet available in a particular language but sill shown (or not shown) in other languages. With multiple sites, they could be seen from another angle, then "just be translated version" of other sites. Then they may become "tenants".... |
Another site related question. Atm you’re kind of like browsing through all of sites at once. Would it be beneficial to have a “global” site picker, for example in the top left corner where the Piranha logo is placed where you select the site you’re working with and the just display data for this site instead of having access to everything on each page? |
I think that adding a site selector to the "Pages" page, like in the "Alias" page, is a good idea. I have no opinion in the matter of having this selector on the left or on the right, like in the alias page. |
@vjacquet What I mean was one global site selector that sets the current site, then this selection follows you as you move between pages until you make another selection. |
IMHO, a global selector can be misleading as to inform the user on what features are site dependent. Of course, restoring the value of the latest selected site would be appreciated. |
As we're going through functionality and evaluating how to plan the long-term development for Piranha CMS we want feedback on if, and if so how you're using the current multi-site functionality. More specifically:
All input is appreciated
The text was updated successfully, but these errors were encountered: