mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Use separate SEF value.
This commit is contained in:
@@ -48,7 +48,7 @@ class gsitemap_url // plugin-folder + '_url'
|
|||||||
{
|
{
|
||||||
foreach($item as $data )
|
foreach($item as $data )
|
||||||
{
|
{
|
||||||
$key = $plug.'-'.$data['function']; // eg. news-latest
|
$key = $plug.'-'.$data['sef']; // eg. news-latest
|
||||||
$config[$key] = array(
|
$config[$key] = array(
|
||||||
'alias' => $key,
|
'alias' => $key,
|
||||||
'regex' => '^'.$key.'-sitemap\.xml$', // matched against url, and if true, redirected to 'redirect' below.
|
'regex' => '^'.$key.'-sitemap\.xml$', // matched against url, and if true, redirected to 'redirect' below.
|
||||||
|
@@ -29,7 +29,8 @@ class news_gsitemap
|
|||||||
// Viewable from my-website.com/news-latest-sitemap.xml ie. plugin-folder + function + 'sitemap.xml'
|
// Viewable from my-website.com/news-latest-sitemap.xml ie. plugin-folder + function + 'sitemap.xml'
|
||||||
$config[] = array(
|
$config[] = array(
|
||||||
'name' => "Latest News Posts",
|
'name' => "Latest News Posts",
|
||||||
'function' => "latest",
|
'function' => "latestPosts",
|
||||||
|
'sef' => 'latest', // used in URL. eg. news-latest-sitemap.xml
|
||||||
);
|
);
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
@@ -96,7 +97,7 @@ class news_gsitemap
|
|||||||
|
|
||||||
|
|
||||||
/* Custom Function for dynamic sitemap of news posts */
|
/* Custom Function for dynamic sitemap of news posts */
|
||||||
function latest()
|
public function latestPosts()
|
||||||
{
|
{
|
||||||
$data = $this->getNewsPosts();
|
$data = $this->getNewsPosts();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user