Galleries in articles
Select LENA albums in the editor and display galleries inside Joomla articles.
You can insert an album between paragraphs in an article. Two plugins installed with LENA provide this feature:
- Editor Button - LENA Gallery opens the album selector and inserts its shortcode into the content;
- Content - LENA Gallery replaces the shortcode with the finished gallery when the article is displayed.
This lets you place an album between paragraphs without creating a separate menu item. An embedded gallery does not require a LENA menu item.
Checking the plugins
Both plugins should be enabled automatically on the package’s first installation. To check their state:
- Go to System → Manage → Plugins.
- Search for
LENA. - Make sure Content - LENA Gallery and Editor Button - LENA Gallery are enabled.
A manual disable is preserved during a package update. If the site began with an older standalone component package, install the current LENA package to add both plugins.
Inserting a gallery
- Open Articles and create or edit an article.
- Create an empty paragraph where the gallery should appear and place the cursor in it.
- Select LENA gallery in the editor. Its position depends on the editor and configuration; it may appear below the text area or in the Joomla buttons menu.
- In Insert LENA gallery, search for an album or narrow the list by category.
- Select the required album card.
- Save the article and check it on the website.
The selector lists published albums. A card shows the title, category, active photo count, access level and, when configured, the cover. The editor button is available in the administrator article editor to a user who has access to the LENA component.
Album shortcode
The editor inserts a shortcode containing the album ID, for example:
{lena album="12"}
You can also type the shortcode manually. Replace 12 with the chosen album’s number; leave lena and album unchanged. Use the ID, not the title or alias. The easiest way to obtain the correct shortcode is to use LENA gallery.
An article can contain several galleries. Put each shortcode in a separate paragraph. If you need a heading or gallery description, add it to the article text.
To remove a gallery from an article, delete the entire shortcode. This does not delete the album or its photos.
Website behaviour
An embedded gallery uses the same thumbnail grid, administrator-defined photo order and enlarged viewer as Single album. It does not display its own album title, leaving the surrounding heading and text under the article author’s control.
The embedded form does not change the document title or add the standalone album view’s ImageGallery structured data. The article view and Joomla template remain responsible for the page title and structured data.
The article stores only the shortcode. LENA displays the current contents of the selected album, so changes to photos and their order apply to every article using that album. If the website uses caching, the cache may need to refresh or be cleared before changes become visible.
The album must be published and available to the visitor. If it has a category, the category’s state and access level and those of its parents are checked as well. An unavailable, unpublished or deleted album leaves no message or shortcode in the article. A published but empty album displays the standard no-published-photos message.
Galleries work in a full article, category blog and featured articles. The shortcode is removed from content passed to Joomla Smart Search indexing.
TinyMCE and JCE
The button uses Joomla’s standard editors-xtd mechanism. It is available in the core TinyMCE editor. In JCE, the user’s profile must allow Editor-xtd buttons; depending on its configuration, LENA gallery may appear in the Joomla toolbar menu.
If the website displays the raw shortcode, first check that Content - LENA Gallery is enabled. If the editor button is missing, check Editor Button - LENA Gallery, the editor profile settings and the permission to access the LENA component.