Skip to content
Snippets Groups Projects
Commit 74e378fd authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5754: fixing link url if route name on csv menu report

parent 2999ba37
No related branches found
No related tags found
1 merge request!270Feature/istwcms 5754 ebremner csv menu report
...@@ -184,7 +184,7 @@ class UwDownloadCsvController extends ControllerBase { ...@@ -184,7 +184,7 @@ class UwDownloadCsvController extends ControllerBase {
// The menus to be used. // The menus to be used.
$menu_names = [ $menu_names = [
'main', 'main',
'menu-audience-menu', 'uw-menu-audience-menu',
]; ];
// The header. // The header.
...@@ -268,7 +268,19 @@ class UwDownloadCsvController extends ControllerBase { ...@@ -268,7 +268,19 @@ class UwDownloadCsvController extends ControllerBase {
$alias = Url::fromUri($link_url)->toString(); $alias = Url::fromUri($link_url)->toString();
} }
else { else {
$link_url = $link->url;
// If there is no url and there ius a route name,
// use the route name as the url. If there is
// a url just use the url.
if (!$link->url && $link->route_name) {
$link_url = $link->route_name;
}
else {
$link_url = $link->url;
}
// Just give the alias a null value, since if we
// get to here there will be no alias.
$alias = NULL; $alias = NULL;
} }
...@@ -309,7 +321,7 @@ class UwDownloadCsvController extends ControllerBase { ...@@ -309,7 +321,7 @@ class UwDownloadCsvController extends ControllerBase {
'parent_link_id' => $parent_id, 'parent_link_id' => $parent_id,
'alias' => $alias, 'alias' => $alias,
'link_path' => $link_url, 'link_path' => $link_url,
'title' => unserialize($link->title), 'title' => '"' . unserialize($link->title) . '"',
'has_children' => $link->has_children, 'has_children' => $link->has_children,
'p1' => $link->p1, 'p1' => $link->p1,
'p2' => $link->p2, 'p2' => $link->p2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment