mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +02:00
FAQs enhancement and support for faq-category SEF urls. (work in progress)
This commit is contained in:
@@ -25,12 +25,22 @@ class faqs_url // plugin-folder + '_url'
|
||||
{
|
||||
$config = array();
|
||||
|
||||
$config[] = array(
|
||||
'regex' => '^faqs/?$',
|
||||
'redirect' => '{e_PLUGIN}faqs/faqs.php',
|
||||
$config['index'] = array(
|
||||
'regex' => '^faqs/?$', // matched against url, and if true, redirected to 'redirect' below.
|
||||
'sef' => 'faqs', // used by e107::url(); to create a url from the db table.
|
||||
'redirect' => '{e_PLUGIN}faqs/faqs.php', // file-path of what to load when the regex returns true.
|
||||
|
||||
);
|
||||
|
||||
$config['category'] = array(
|
||||
'regex' => '^faqs/(.*)$',
|
||||
'sef' => 'faqs/{faq_info_sef}', // {faq_info_sef} is substituted with database value when parsed by e107::url();
|
||||
'redirect' => '{e_PLUGIN}faqs/faqs.php?cat=$1'
|
||||
);
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user