1
0
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:
Cameron
2015-01-28 02:29:26 -08:00
parent fb22dc7b11
commit 05c8f263d1
7 changed files with 73 additions and 39 deletions

View File

@@ -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;
}
}