Hi Sakis,
thanks for offering help. - All right, I'll try to explain what I try to achieve.
Usually I offer my clients a restricted frontend access to edit some Joomla articles without the need to access the rather complex Joomla backend. As you can see on the attached screenshots, I use a Joomla article with a Table9 Yootheme Pro Element to list all articles of a specific category. The client can access an individual article in edit view through this list. This works like this:
I use the Table9 Link to create an edit button wich basically opens Joomla's "Create new article" page. The Button needs the ID (see image *11.png) of the article and a "Before" string like this (See screenshot):
/?task=article.edit&return=[RETURN]&a_id=
The [RETURN] parameter gets replaced by jQuery with the result of a invisble Yootheme PRO text field, where the return hash is calculated like this (- using RegularLabs Sourcerer):
echo base64_encode(\Joomla\CMS\Uri\Uri::getInstance());
The text field's ID in this case is uri_base64encoded. Here's the jQuery code I use in the custom.js of a Yootheme Pro child theme to replace all the [RETURN] flags with the uri_base64encoded, calculated in the text field:
document.addEventListener('DOMContentLoaded', function () {
if (!window.jQuery) {
// UIkit.notification("Table 9 Element: jQuery is not loaded. Datatables module will be disabled.", {status:'warning', pos: 'bottom-right'});
return;
}
else {
jQuery(document).ready(function($){
// fix return parameter in links to editor view
// example URL /labelmanager/label-create?task=article.edit&return=[RETURN]&a_id=
$('.fs-table-column.fs-table-link .el-link.uk-button').each(function() {
if (this.href.indexOf('-create') != -1) {
this.href = this.href.replace('[RETURN]', $('#uri_base64encoded').text());
}
});
// for links to edit form in title column or on image
$('.fs-table-column .el-title a').each(function() {
if (this.href.indexOf('-create') != -1) {
this.href = this.href.replace('[RETURN]', $('#uri_base64encoded').text());
}
});
});
}
});
On large datasets Table9 element gets super slow and I cannot use this approach. But luckily you created JSFilters! :-)
Instead of one article with a Table9 Yootheme element I use a filtered category page using a JSFilters Menu item. The Table9 Yootheme Pro element gets filled with all entries defiened in the JSFilters Menu item. - The only drawback is, that there is no article ID in the JFilters Results Item (see image *29.png).
I hope this makes sense for you.
Thanks for your help and time.
Best
Bernhard