Add maintenance information to the frontend for the content editor
Previous article Next articleWhen browsing the website, it isn't always clear for a content editor where the page content is stored/generated... In the Content Manager? Or in a (third party) module. In some cases - like CGBlog - the CGActionBar module will be the best solution, but it doesn't work for all third party modules and situations.
This method will show a red help text box in the frontend what will guide the editor in the Admin area. Ohw, and of course it will only be visible when the editor is logged in the Admin area.
How to use
Create a User Defined Tag (UDT) named 'MaintenanceInfo' and use the content:
$list = '';
if ( ($loggedin > 0) && (isset($params)) )
{
foreach ( $params as $name => $value ) { $list = $list . "$name > $value, "; }
echo '<p style="background:#f00;color:#fff;padding:10px;">Change this text in: ' . substr($list, 0, -2) . '.</p>';
}
In this demo I also added a Font Awesome icon:
$list = '';
if ( ($loggedin > 0) && (isset($params)) )
{
foreach ( $params as $name => $value ) { $list = $list . "$name > $value, "; }
echo '<p style="background:#f00;color:#fff;padding:10px;"><i class="fas fa-edit"></i> Change this text in: ' . substr($list, 0, -2) . '.</p>';
}
In the (module) templates you can now call this UDT and add as much Parameter - Value pairs as you wish. In example:
It will show in the frontend, only when the editor is logged in into the Admin panel:
Change this text in: Param1 > Value1, Param2 > Value2, Param3 > Value3.
Working example
1 - Core::Generic template
Add to the bottom of the Core::Generic template (HTML Block) in the Design Manager:
When looking at the detail information, it will show:
Change this text in: Menu > Layout, Module > Design Manager, Tab > Templates, Name > Your_Template.
2 - CustomGS module
You use the CustomGS module to maintain the website name, address, city, telephone number, etc.
At the contact page you call these values to show them.
Add below the content:
It will show in the frontend, only when the editor is logged in into the Admin panel:
Change this text in: Menu > Content, Module > CustomGS, Tab > Address.
3 - Company Directory module
Add to the bottom of the detail template of the Company Directory module
When looking at the detail information, it will show:
Change this text in: Menu > Content, Module > Company Directory, Company > Company Name.
4 - Products module
Add to the bottom of the detail template of the Products module
When looking at the detail information, it will show:
Change this text in: Menu > Content, Module > Product Manager, Item > Product Name.
5 - LISE module
Add to the bottom of the detail template of the LISE[instance] module
When looking at the detail information, it will show:
Change this text in: Menu > Content, Module > LISE[instance].
Comment Form
ReviewManager
ReviewManager
0 Comments
No comments yet...