Content Sharing
Share a page, a content item or a file with people who have no Jahia account: a review link that shows a draft before it is published, or a link to protected published content, each with its own expiry date. Every link of a site is listed in one place, where it can be revoked. In English, French, German and Spanish.
Content Sharing lets editors hand a page, a content item or a file to people who have no account on Jahia: a client approving a campaign page, a lawyer checking a press release, a partner downloading a protected document. They open a link; nothing to sign in to, nothing to install.
Share a draft for review
- In Page Builder, Share for external review is in the menu next to Preview. On a content item with its own URL or a file, it is in the item's menu in jContent.
- The dialog creates a link for the language being edited, valid from one day to 30 days, and says beforehand what the reviewer will see: every unpublished change on the page, not only yours.
- From then on it shows the link: copy it, open it as a reviewer, move its expiry date, or revoke it.
- The reviewer sees the draft with its images, under a notice saying that it is a draft and may still change.
- Creating, changing or revoking a review link leaves the publication status of the page as it was, and the link is never published.
Share published content
- In Content Editor, switch on Share protected content and create the link. Anyone holding it reads the published content as a visitor, even where the site restricts it; a file is served as a download.
- An optional expiry date stops the link on its own.
See and revoke every link
- Site Settings > Shared links lists every link of the site, both kinds, in every language: the content it opens, its expiry date and its state (live, not published yet, revoked but still live, expired).
- Each row carries its action: revoke a link, or publish a revocation that has not reached the live site yet.
- Export CSV and Export JSON hand the list to the browser, without the addresses, so an exported file opens nothing.
Safe by design
- Every link has its own random key, checked on every request; an unknown, expired or revoked link answers "not found", like a page that does not exist.
- A link to published content never opens the draft, and a review link never opens another language or another page.
- The dialog and the list run with the editor's own rights: someone who cannot edit a content cannot share it or revoke its link.
Screenshots
How to install
Requirements
- Jahia 8.2. Tested on Jahia 8.2.3.2 with jContent 3.8.1, the version that shows Share for external review in the menu next to Preview. The module needs no other module, no external service and no configuration file.
- To share a content item that is not a page (a news item, an event), the site's template set must offer a template that displays it on its own URL, as it does for any content with its own URL. Pages and files need nothing.
1. Install the module (once per server)
- Install it from the Jahia Store, or download content-sharing-2.5.3.jar from the GitHub release.
- For the file: open Administration > Server > Modules and Extensions > Modules, tab Installed modules. Under Upload module from file, click Select module, choose the jar and upload it.
- Content Sharing appears in the list with the state Started.
2. Enable it on each site
- In the same list, click Content Sharing.
- Under Usage in sites, switch each site that will share content from Disabled to Enabled.
3. First configuration
None. Links use the address of the Jahia server they are created on. A site served under another address can give its own in the Content Editor field's options (origin, see the guide).
4. Check it works
- Open a page in Page Builder: Share for external review is in the menu next to Preview. It is offered to whoever can edit the page: the default editor and site-administrator roles; reviewer and translator do not see it.
- Create a link, then open it in a private window: the page shows with the draft notice.
- Administration > Sites > (site) > Shared links lists the link (role site-administrator).
Upgrade
Upload the new version the same way; Jahia stops the previous version and starts the new one. Uploading a version that is already installed again is skipped unless you force the update. From 2.4 or earlier, run the migration script described in UPGRADE.md after the upload, so that review links made before keep working.
Scripted install (administrators)
With Jahia's provisioning API, as a server administrator:
curl -u root:<password> https://<jahia>/modules/api/provisioning \ -F 'script=[{"installOrUpgradeBundle":"content-sharing-2.5.3.jar","autoStart":true},{"enable":"content-sharing","site":"<siteKey>"}];type=application/json' \ -F file=@content-sharing-2.5.3.jar
FAQ
What is the difference between the two kinds of link?
A review link (Share for external review) shows the content as it stands in the editing workspace, published or not, and always expires, at most 30 days after its expiry date was last set. A link to published content (Share protected content) shows what visitors see, and expires only if you give it a date. They are separate on purpose: a content can carry both, and holding one never opens the other.
What does a reviewer see?
The page as it stands now, with every unpublished change on it, including other people's, and its images. A notice above the page says it is a draft. Links to other pages may not open for the reviewer: the link shares one page, not the site.
Does creating a review link change the publication status?
Not for a page. A content item or a file shows as modified once, after its first review link; publishing it does not publish the link.
How do I stop a link?
A review link: Revoke in the dialog or in Shared links; it stops at once. A link to published content: Revoke in Shared links, then publish the revocation from the same row; until then the row says Revoked, still live.
Are openings of a link recorded?
No. The module does not count or log who opens a link, and does not limit how often it is opened. Give each link the shortest expiry that fits, and revoke it once it is no longer needed.
MIT License. Copyright (c) 2024 to present Jahia Solutions Group SA. Full text: LICENSE.