Hướng dẫn xóa ID bài viết trong URL - Joomla 3.7

Moderator: hungkhanggl

Forum rules
Locked
tuanthuaan
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Aug 26, 2017 2:11 am

Hướng dẫn xóa ID bài viết trong URL - Joomla 3.7

Post by tuanthuaan » Sat Aug 26, 2017 2:20 am

Để xóa ID bài viết khỏi URL trong Joomla 3.7, bạn cần làm như sau:

Mở file router.php nằm trong thư mục components / com_content .

Thay đổi đoạn:

Code: Select all

if ($params->get('sef_advanced', 0))
{
    $this->attachRule(new JComponentRouterRulesStandard($this));
    $this->attachRule(new JComponentRouterRulesNomenu($this));
}
else
{
    JLoader::register('ContentRouterRulesLegacy', __DIR__ . '/helpers/legacyrouter.php');
    $this->attachRule(new ContentRouterRulesLegacy($this));
}
thành đoạn:

Code: Select all

JLoader::register('ContentRouterRulesLegacy', __DIR__ . '/helpers/legacyrouter.php');
$this->attachRule(new ContentRouterRulesLegacy($this));
Mở file legacyrouter.php nằm trong thư mục components / com_content / helpers , và thay đổi cả hai trường hợp của dòng sau (file này có 2 dòng này và thay đổi cả 2) :

$advanced = $params->get('sef_advanced_link', 0);

thành:

$advanced = 1;

Locked

Return to “Hỏi đáp Joomla! 3.x”