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 {
// The menus to be used.
$menu_names = [
'main',
'menu-audience-menu',
'uw-menu-audience-menu',
];
// The header.
......@@ -268,7 +268,19 @@ class UwDownloadCsvController extends ControllerBase {
$alias = Url::fromUri($link_url)->toString();
}
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;
}
......@@ -309,7 +321,7 @@ class UwDownloadCsvController extends ControllerBase {
'parent_link_id' => $parent_id,
'alias' => $alias,
'link_path' => $link_url,
'title' => unserialize($link->title),
'title' => '"' . unserialize($link->title) . '"',
'has_children' => $link->has_children,
'p1' => $link->p1,
'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