A small hack to set the default Itemid for new posts added into the admin panel can be done at 2 places in the
file: components/com_sef/joomsef.php
Line: 1462
if (isset($Itemid) && ($Itemid != '')) {
$col = ', `Itemid`';
$val = ", '171'";
// Itemid of the menu item, which is included for almost all modules in our site
}
Line: 1567
if (isset($Itemid) && ($Itemid != '')) {
$col = ', `Itemid`';
$val = ", '171'";
}
Whenever a new article is added in the admin panel, and its link is visited in the front end, a record is inserted into the jos_sefurls table, with the Itemid column value as 1. This can be hacked with the above code modification, to include a custom Itemid for the new url, so that relevant modules are loaded in the new article.
file: components/com_sef/joomsef.php
Line: 1462
if (isset($Itemid) && ($Itemid != '')) {
$col = ', `Itemid`';
$val = ", '171'";
// Itemid of the menu item, which is included for almost all modules in our site
}
Line: 1567
if (isset($Itemid) && ($Itemid != '')) {
$col = ', `Itemid`';
$val = ", '171'";
}
Whenever a new article is added in the admin panel, and its link is visited in the front end, a record is inserted into the jos_sefurls table, with the Itemid column value as 1. This can be hacked with the above code modification, to include a custom Itemid for the new url, so that relevant modules are loaded in the new article.
Comments
Post a Comment