diff --git a/src/Controller/UwDownloadCsvController.php b/src/Controller/UwDownloadCsvController.php index 3ee933dcd557544e442dba31dd91f511baaf4244..128d60e5f98abb7054d2f45bd4ea75174df28212 100644 --- a/src/Controller/UwDownloadCsvController.php +++ b/src/Controller/UwDownloadCsvController.php @@ -151,7 +151,7 @@ class UwDownloadCsvController extends ControllerBase { // The menus to be used. $menu_names = [ 'main', - 'menu-audience-menu', + 'uw-menu-audience-menu', ]; // The header. @@ -235,7 +235,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; } @@ -276,7 +288,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,