New feature for Liferay 7: Sharing Content between Sites

Hi there!

In the WCM Team, we have finished a very cool feature for Liferay 7! It is already merged in master and will be available in the next millestone.

Before 7.0, when you wanted to share a structure or template between different sites you had to put this common content in the Global scope.

After 7.0, you can share these types of content with your child sites. As the administrator of a child site, you will be able to use all the structures, templates, categories, application display templates... etc from any of your parent sites that allows for it (this can be disabled in Site Settings).

 

At this point we have applied this sharing pattern to:

  • Web Content Structures
  • Web Content Templates
  • Document Types
  • Vocabularies and Categories
  • Application Display Templates
  • Data Definitions (Dynamic Data Lists)

 

What do you think?

Is there any other place in which you would like to see this applied?

 

 

 

 

Blogs
We are currently deploying our content and portal site in Liferay 6.2. We have been looking at this very issue, how we can share content, categories, structures with child sites and not seeing how. It sounds like this is being addressed in version 7. That helps us. We should just wait.

Request: Make this work for Related Assets. It would be very helpful to link a Related Asset that exists in another site, at least assets in a parent / child relationship.
Hi !!
I've tried it in Liferay 7 Milestone 4 but I don't know how it works.
I've built a Web Content in Liferay Inc. site, it has Liferay Madrid as a child site but when I try to add Web Content in Liferay Madrid this doesn't appear. How I should do it?
Hi
I have tried this feature in liferay-portal-7.0-ce-m4, i dont know ow it works and bit confusing.
I have created 1 user as administrator for child site and created structure, template and web content too. after that i dont how to share this .
can any body knows the steps to use this feature .
While sharing structures and templates is a handy tool, it's not a big improvement on just putting them in the global repository. These are not the same as sharing the content itself, which would have more value IMHO.

Has content "sharing" gotten any improvements from 6.2? To me sharing by virtue of a site hierarchy means the content is available without needing to hard-wire the scope for every portlet that will display it. This is especially important if site and page templates are used. Site hierarchy will change for every site so hard-wiring is not a useful option and seriously limits the possible benefits gained from leveraging this feature.
Hi Peter,

Asset Publisher can list content from sites in the hierarchy but it has to be configured in order to so and the scope of portlets can be changed too (that is probably what you mean by hard-wiring).

How would you expect this sharing feature to work? I am very interested to hear more about the way you would like sites to share content.
Hi Julio,
Right now, the functionality to share content within a site hierarchy is a bit limited. Only the Asset Publisher can do it, and sharing can only be done explicitly … by defining (hard-wiring) the scope to be searched in each and every instance of Asset Publisher that needs to display shared content.

Obviously, missing the Web Content Display is a regrettable omission that forces sharing to be done via the Global repository if you want to use that plugin. Enough said here.

Explicit configuration, unfortunately, makes the use of shared content within a larger hierarchies problematic. While I could see it as a potentially workable solution for a small, simple hierarchies that don’t change, the larger the hierarchy and the more frequent the changes to it, the more unusable explicit sharing becomes.

The explicit sharing mechanism might actually be more correctly termed as content “exposure” than “sharing”. This is very different from what I imagined when I first read about content sharing. While this may seem a small difference, it kills the use of site and page templates across a large organizational hierarchy.

For example, the portal I’m currently working on has over 1400 leaf level sites in its hierarchy. This large tree reflects the company’s organizational structure. About 5 new leaf level sites are added every week, so leveraging site and page templates is an absolute necessity with the small staff managing the portal. The current requirement to hard-wire scope dramatically increases the work to provision a new site as it is impossible to use page templates effectively and forces manual configuration. To further exacerbate stand-up and maintenance issues, nodes throughout the hierarchy may need to be moved to accommodate the company’s rapid growth. When this happens, the site has to be re-wired to reflect the new location.

Managing and maintaining the explicit “hard-wiring” of all the Asset Publisher instances across dozens of pages in a site and across hundreds of sites is impractical at best and is IMO an unworkable solution. Every node in the site hierarchy can have a unique ancestry chain based on its position in the hierarchy.

My recommendation would be that instead of exposing content explicitly, you should consider sharing content implicitly by making the content available (by reference) within the scope of any child site down the hierarchy. You might think of this as using an alias. If it appeared as a local asset (by reference) there would be no need to configure scope. The content is owned and managed by whoever created it and maintained where it “lives” but is implicitly visible and available to the child sites.

This would dramatically simplify sharing as it becomes automatic based on the relationship of nodes in the site hierarchy instead of requiring time consuming and unnecessary configuration of scope everywhere. When nodes are moved, content references to items that are no longer in their ancestry disappear, and new content references are shown. The presentation of shared content could be calculated at run-time so changes would always be reflected in child nodes.

Clearly, there are lots of additional enhancements that could be added to make implicit sharing more flexible, but implementing just this would allow larger corporate customers to benefit from content sharing without the necessity to hard-wire scope in thousands of content instances or be forced to either customize Liferay or devise some clumsy custom permissions based sharing strategy.

Implicit sharing promotes simplicity and flexibility instead of limiting it as the current functionality does.
Hi Peter,

the Web Content Display is also working as the Asset Publisher in 7 (it was already like that in the previous millestone), now users can choose content from the hierarchy also.... so that one should be ok emoticon

Regarding the other proposal about the dynamic content exposure, I think it makes a lot of sense... I just mentioned the example to our Product Manager and he was very interested in hearing more about your use case and how you would expect this to work (and also the lots of additional enhancements that you mentioned). I will send him your details so that he can reach you.

Thanks a lot!
Hi Julio,
That's great, I'm glad to hear that the Web Content Display will have this feature added in v7 as well. Unfortunately, since the 7 isn't out yet and the company is a slow updater I'll have to live with global content for spots where I need that plugin until 7 has been out for a while.

I'd be happy to share my ideas and collaborate with your product manager on a solution. Since I also have a perfect test-case for why this would be useful, I'd also be willing to test solutions out.

In the mean-time I'll be hooking the Asset Publisher to get a short term fix.