From ae69dbf546e52f5543652ee748e6b3cc718ac0b9 Mon Sep 17 00:00:00 2001 From: WebDevTrev <96503752+web-dev-trev@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:15:37 -0600 Subject: [PATCH 1/7] Add logic check for if page is published if not 404 [WEB-2988] --- app/Http/Controllers/PressReleasesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/PressReleasesController.php b/app/Http/Controllers/PressReleasesController.php index aac6c2ea93..be7029f893 100644 --- a/app/Http/Controllers/PressReleasesController.php +++ b/app/Http/Controllers/PressReleasesController.php @@ -149,7 +149,7 @@ protected function getNavElements($title) public function show($id) { - $item = $this->repository->getById((int) $id); + $item = $this->repository->published()->findOrFail((int) $id); $canonicalPath = route('about.press.show', ['id' => $item->id, 'slug' => $item->getSlug()]); From cbdfd16f90a7912ecd133e5d725ddd3814fa483d Mon Sep 17 00:00:00 2001 From: WebDevTrev <96503752+web-dev-trev@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:53:42 -0600 Subject: [PATCH 2/7] Merge pull request #642 from art-institute-of-chicago/fix/press-releases-published-statuts Add logic check for if page is published if not 404 [WEB-2988] From c8da6ae4e023393a985b70f46bfccbda6277ab0e Mon Sep 17 00:00:00 2001 From: nikhil trivedi Date: Wed, 18 Dec 2024 15:27:15 -0600 Subject: [PATCH 3/7] Refactor SFMC integration --- app/Libraries/ExactTargetService.php | 207 +++++++++------------------ composer.json | 5 - composer.lock | 158 +------------------- 3 files changed, 75 insertions(+), 295 deletions(-) diff --git a/app/Libraries/ExactTargetService.php b/app/Libraries/ExactTargetService.php index 7254b7dc8e..c67169c6f6 100644 --- a/app/Libraries/ExactTargetService.php +++ b/app/Libraries/ExactTargetService.php @@ -2,11 +2,9 @@ namespace App\Libraries; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Str; use App\Models\ExactTargetList; -use FuelSdk\ET_Client; -use FuelSdk\ET_DataExtension_Row; -use FuelSdk\ET_Subscriber; class ExactTargetService { @@ -42,14 +40,9 @@ public function __construct( */ public function subscribe($alsoRemove = true) { - $client = $this->getEtClient(); - - // Add the user to a data extension - $deRow = new ET_DataExtension_Row(); - - $deRow->authStub = $client; - $deRow->props = [ - 'Email' => $this->email, + $accessToken = $this->getAccessToken(); + $dataExtensionKey = config('exact-target.customer_key'); + $props = [ 'OptMuseum' => 'True', ]; @@ -62,65 +55,35 @@ public function subscribe($alsoRemove = true) foreach ($allLists as $list) { if (in_array($list, $this->list)) { - $deRow->props[$list] = 'True'; + $props[$list] = 'True'; } elseif ($alsoRemove) { - $deRow->props[$list] = 'False'; + $props[$list] = 'False'; } } } if ($this->wasFormPrefilled || $this->firstName) { - $deRow->props['FirstName'] = $this->firstName; + $props['FirstName'] = $this->firstName; } if ($this->wasFormPrefilled || $this->lastName) { - $deRow->props['LastName'] = $this->lastName; - } - - $deRow->CustomerKey = config('exact-target.customer_key'); - $deRow->Name = config('exact-target.name'); - - $response = $deRow->post(); - - // If it fails, try patch - if (!$response->status) { - $response = $deRow->patch(); - - if (!$response->status) { - return $response; - } - } - - // Add the subscriber - $subscriber = new ET_Subscriber(); - $subscriber->authStub = $client; - $subscriber->props = [ - 'EmailAddress' => $this->email, - 'SubscriberKey' => $this->email, - ]; - $response = $subscriber->post(); - - if (!$response->status) { - $error = $response->results[0]->ErrorMessage ?? ''; - $status = $response->results[0]->StatusMessage ?? ''; - - if ( - Str::startsWith($error, 'Violation of PRIMARY KEY constraint') - || Str::startsWith($status, 'The subscriber is already on the list') - ) { - // Email has been previously subscribed, so proceed - } else { - return $response; - } + $props['LastName'] = $this->lastName; } - // Then patch it with some additional properties - $subscriber->props['Status'] = 'Active'; - $subscriber->Name = 'Museum Business Unit'; - $response = $subscriber->patch(); + $response = Http::withToken($accessToken)->post( + config('exact-target.client.baseUrl') . "hub/v1/dataeventsasync/key:$dataExtensionKey/rowset", + [ + [ + 'keys' => [ + 'Email' => $this->email + ], + 'values' => $props + ] + ] + ); - if (!$response->status) { - return $response; + if ($response->failed()) { + return $response->json(); } return true; @@ -131,38 +94,35 @@ public function subscribe($alsoRemove = true) */ public function unsubscribe() { - $client = $this->getEtClient(); + $accessToken = $this->getAccessToken(); + $dataExtensionKey = config('exact-target.customer_key'); // Delete the user from the data extension - $deRow = new ET_DataExtension_Row(); - - $deRow->authStub = $client; - $deRow->props = [ - 'Email' => $this->email, - ]; - - $deRow->CustomerKey = config('exact-target.customer_key'); - $deRow->Name = config('exact-target.name'); - - $response = $deRow->delete(); + $response = Http::withToken($accessToken)->delete( + config('exact-target.client.baseUrl') . "hub/v1/dataevents/key:$dataExtensionKey/rowset", + [ + 'keys' => [ + 'Email' => $this->email + ] + ] + ); - if (!$response->status) { - return $response; + if ($response->failed()) { + return $response->json(); } // Set the subscriber to Unsubscribed - $subscriber = new ET_Subscriber(); - $subscriber->authStub = $client; - $subscriber->props = [ - 'EmailAddress' => $this->email, - 'SubscriberKey' => $this->email, - 'Status' => 'Unsubscribed' - ]; - $subscriber->Name = 'Museum Business Unit'; - $response = $subscriber->patch(); + $subscriberResponse = Http::withToken($accessToken)->patch( + config('exact-target.client.baseUrl') . "contacts/v1/subscribers", + [ + 'EmailAddress' => $this->email, + 'SubscriberKey' => $this->email, + 'Status' => 'Unsubscribed' + ] + ); - if (!$response->status) { - return $response; + if ($subscriberResponse->failed()) { + return $subscriberResponse->json(); } return true; @@ -170,69 +130,44 @@ public function unsubscribe() public function get() { - $client = new ET_Client(false, config('app.debug'), config('exact-target.client')); - - $deRow = new ET_DataExtension_Row(); - $deRow->authStub = $client; - - // Select - $allLists = ExactTargetList::getList()->keys()->all(); - $fields = array_merge( + $accessToken = $this->getAccessToken(); + $dataExtensionKey = config('exact-target.customer_key'); + $fields = array_merge([ + 'Email', + 'FirstName', + 'LastName', + ], ExactTargetList::getList()->keys()->all()); + + $response = Http::withToken($accessToken)->get( + config('exact-target.client.baseUrl') . "data/v1/customobjectdata/key:$dataExtensionKey/rowset", [ - 'Email', - 'FirstName', - 'LastName', - ], - $allLists + 'fields' => implode(',', $fields), + 'filter' => [ + 'Property' => 'Email', + 'SimpleOperator' => 'equals', + 'Value' => $this->email + ] + ] ); - $deRow->props = $fields; - - // From (e.g. "All Subscribers Master") - $deRow->Name = config('exact-target.customer_key'); - - // Where - $deRow->filter = [ - 'Property' => 'Email', - 'SimpleOperator' => 'equals', - 'Value' => $this->email, - ]; - - return $deRow->get(); + return $response->json(); } - protected function getEtClient() + protected function getAccessToken() { $auth_url = config('exact-target.client.baseAuthUrl'); - $clientId = config('exact-target.client.clientid'); - $clientSecret = config('exact-target.client.clientsecret'); - $api = new \GuzzleHttp\Client(); + $response = Http::asForm()->post($auth_url . "v2/token", [ + 'grant_type' => 'client_credentials', + 'client_id' => config('exact-target.client.clientid'), + 'client_secret' => config('exact-target.client.clientsecret'), + ]); - $result = $api->request( - 'POST', - $auth_url . '/v2/token', - [ - 'json' => [ - 'client_id' => $clientId, - 'client_secret' => $clientSecret, - 'grant_type' => 'client_credentials', - ] - ] - ); - $tokenInfo = json_decode($result->getBody()->getContents(), true); + if ($response->failed()) { + throw new \Exception('Unable to retrieve access token'); + } - return new ET_Client( - true, - config('app.debug'), - array_merge( - config('exact-target.client'), - [ - 'authorizationCode' => $tokenInfo['access_token'], - 'scope' => $tokenInfo['scope'], - ] - ) - ); + return $response->json()['access_token']; } } diff --git a/composer.json b/composer.json index d9bb649926..375896ba32 100644 --- a/composer.json +++ b/composer.json @@ -14,10 +14,6 @@ "type": "vcs", "url": "/~https://github.com/art-institute-of-chicago/data-hub-foundation.git" }, - { - "type": "vcs", - "url": "/~https://github.com/axsweet/FuelSDK-PHP.git" - }, { "type": "package", "package": { @@ -61,7 +57,6 @@ "michelf/php-smartypants": "^1.8", "ramsey/uuid": "^4.0", "rlanvin/php-rrule": "^2.0", - "salesforce-mc/fuel-sdk-php": "dev-master", "sendgrid/sendgrid": "^8.1", "sentry/sentry-laravel": "^4.9", "spatie/calendar-links": "^1.0", diff --git a/composer.lock b/composer.lock index 466248822c..ba56c05c1d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9061b70c83062135f3beada78a896b01", + "content-hash": "69dd7545eae675260459358169e381ed", "packages": [ { "name": "aic/data-hub-foundation", @@ -6772,154 +6772,6 @@ }, "time": "2023-06-07T13:15:59+00:00" }, - { - "name": "robrichards/wse-php", - "version": "2.0.3", - "source": { - "type": "git", - "url": "/~https://github.com/robrichards/wse-php.git", - "reference": "f705f0242ab5f9ea69570955d2ebc64a902b12eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/robrichards/wse-php/zipball/f705f0242ab5f9ea69570955d2ebc64a902b12eb", - "reference": "f705f0242ab5f9ea69570955d2ebc64a902b12eb", - "shasum": "" - }, - "require": { - "php": ">= 5.3", - "robrichards/xmlseclibs": ">=3.0.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "RobRichards\\WsePhp\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Rob Richards", - "homepage": "http://www.cdatazone.org/", - "role": "Main developer" - } - ], - "description": "Libraries for adding WS-* support to ext/soap in PHP.", - "homepage": "/~https://github.com/robrichards/wse-php", - "keywords": [ - "WS-Security", - "soap", - "ws-addressing" - ], - "support": { - "issues": "/~https://github.com/robrichards/wse-php/issues", - "source": "/~https://github.com/robrichards/wse-php/tree/master" - }, - "time": "2019-01-03T15:37:08+00:00" - }, - { - "name": "robrichards/xmlseclibs", - "version": "3.1.1", - "source": { - "type": "git", - "url": "/~https://github.com/robrichards/xmlseclibs.git", - "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/robrichards/xmlseclibs/zipball/f8f19e58f26cdb42c54b214ff8a820760292f8df", - "reference": "f8f19e58f26cdb42c54b214ff8a820760292f8df", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "php": ">= 5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "RobRichards\\XMLSecLibs\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "A PHP library for XML Security", - "homepage": "/~https://github.com/robrichards/xmlseclibs", - "keywords": [ - "security", - "signature", - "xml", - "xmldsig" - ], - "support": { - "issues": "/~https://github.com/robrichards/xmlseclibs/issues", - "source": "/~https://github.com/robrichards/xmlseclibs/tree/3.1.1" - }, - "time": "2020-09-05T13:00:25+00:00" - }, - { - "name": "salesforce-mc/fuel-sdk-php", - "version": "dev-master", - "source": { - "type": "git", - "url": "/~https://github.com/axsweet/FuelSDK-PHP.git", - "reference": "a5be7ca56420b9cbc6114faff4f6d1846e5d9c53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/axsweet/FuelSDK-PHP/zipball/a5be7ca56420b9cbc6114faff4f6d1846e5d9c53", - "reference": "a5be7ca56420b9cbc6114faff4f6d1846e5d9c53", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-openssl": "*", - "ext-soap": "*", - "firebase/php-jwt": ">=5.0.0", - "php": ">=5.6.24", - "robrichards/wse-php": "2.0.3" - }, - "require-dev": { - "dompdf/dompdf": "0.6", - "phpdocumentor/phpdocumentor": "2.8.0", - "phpunit/phpunit": ">=5.7.20" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "FuelSdk\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "FuelSdk\\Test\\": "tests/" - } - }, - "license": [ - "MIT" - ], - "description": "Salesforce Marketing Cloud Fuel SDK for PHP", - "homepage": "https://developer.salesforce.com/docs/atlas.en-us.mc-sdks.meta/mc-sdks/index-sdk.htm", - "keywords": [ - "exacttarget", - "fuel sdk", - "fuel-sdk", - "marketing cloud", - "php sdk", - "salesforce", - "sdk" - ], - "support": { - "source": "/~https://github.com/axsweet/FuelSDK-PHP/tree/master" - }, - "time": "2021-10-26T20:46:29+00:00" - }, { "name": "sebastian/diff", "version": "5.0.3", @@ -14816,14 +14668,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "salesforce-mc/fuel-sdk-php": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "^8.1" }, - "platform-dev": {}, - "plugin-api-version": "2.6.0" + "platform-dev": [], + "plugin-api-version": "2.3.0" } From d1678bfebedc6904baabe0443668ae23ceb77dbc Mon Sep 17 00:00:00 2001 From: nikhil trivedi Date: Wed, 18 Dec 2024 15:38:50 -0600 Subject: [PATCH 4/7] Remove /subscribers endpoint that 404s --- app/Libraries/ExactTargetService.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/Libraries/ExactTargetService.php b/app/Libraries/ExactTargetService.php index c67169c6f6..2e3f8e6411 100644 --- a/app/Libraries/ExactTargetService.php +++ b/app/Libraries/ExactTargetService.php @@ -111,20 +111,6 @@ public function unsubscribe() return $response->json(); } - // Set the subscriber to Unsubscribed - $subscriberResponse = Http::withToken($accessToken)->patch( - config('exact-target.client.baseUrl') . "contacts/v1/subscribers", - [ - 'EmailAddress' => $this->email, - 'SubscriberKey' => $this->email, - 'Status' => 'Unsubscribed' - ] - ); - - if ($subscriberResponse->failed()) { - return $subscriberResponse->json(); - } - return true; } From 19c3e58a4d1b5b4ca2b4fa82d819ff96930699bf Mon Sep 17 00:00:00 2001 From: nikhil trivedi Date: Thu, 19 Dec 2024 08:29:41 -0600 Subject: [PATCH 5/7] Merge pull request #641 from art-institute-of-chicago/fix/sfmc-fuelsdk Refactor SFMC integration From f0bb836678e011b54b624c5685ae0ebf3b186b84 Mon Sep 17 00:00:00 2001 From: nikhil trivedi Date: Thu, 19 Dec 2024 16:00:31 -0600 Subject: [PATCH 6/7] Renamed duped digipub article browser route * Renamed duped digipub article browser route * Fix mistyped import --- resources/views/admin/partials/featured-related.blade.php | 2 +- routes/admin.php | 2 +- routes/api.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/admin/partials/featured-related.blade.php b/resources/views/admin/partials/featured-related.blade.php index 2369e005c6..9ddcd6f3ae 100644 --- a/resources/views/admin/partials/featured-related.blade.php +++ b/resources/views/admin/partials/featured-related.blade.php @@ -32,7 +32,7 @@ ], [ 'label' => 'Digital Publication Article', - 'value' => moduleRoute('digitalPublications.articles', 'collection.articles_publications', 'browser'), + 'value' => moduleRoute('digitalPublications.articles', 'collection.articles_publications', 'browserbrowser'), ], [ 'label' => 'Video', diff --git a/routes/admin.php b/routes/admin.php index 91027008c8..c3f8b374b1 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -90,7 +90,7 @@ // WEB-1963: Browser for nested modules must be implemented manually Route::get('/digitalPublicationsBrowser/articles/browser?digitalPublication={digitalPublication}', [DigitalPublicationArticleController::class, 'browser'])->name('collection.articles_publications.digitalPublications.articles.subbrowser'); - Route::get('/digitalPublicationsBrowser/articles/browser', [DigitalPublicationArticleController::class, 'browser'])->name('collection.articles_publications.digitalPublications.articles.browser'); + Route::get('/digitalPublicationsBrowser/articles/browser', [DigitalPublicationArticleController::class, 'browser'])->name('collection.articles_publications.digitalPublications.articles.browserbrowser'); }); Route::module('galleries'); diff --git a/routes/api.php b/routes/api.php index 311be8a51b..49c668f9cc 100644 --- a/routes/api.php +++ b/routes/api.php @@ -21,7 +21,7 @@ use App\Http\Controllers\API\InteractiveFeaturesController; use App\Http\Controllers\API\LandingPagesController; use App\Http\Controllers\API\LocationsController; -use App\http\Controllers\API\PageFeaturesController; +use App\Http\Controllers\API\PageFeaturesController; use App\Http\Controllers\API\PressReleasesController; use App\Http\Controllers\API\PrintedPublicationsController; use App\Http\Controllers\API\SponsorsController; From 0b9f6c350e2e3fd25359e7438a0b169041661988 Mon Sep 17 00:00:00 2001 From: nikhil trivedi Date: Thu, 19 Dec 2024 16:24:19 -0600 Subject: [PATCH 7/7] Remove use of `route` method from megamenu --- app/Providers/AppServiceProvider.php | 67 ++++++++++++++-------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 7f14514f75..bd96ef635a 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -160,15 +160,16 @@ private function composeTemplatesViews() $view->with(\Cache::remember('navArray', 3600, function () { return [ '_pages' => [ - 'visit' => route('pages.slug', ['slug' => 'visit']), - 'hours' => route('pages.slug', ['slug' => 'visit']) . '#hours', - 'directions' => route('pages.slug', ['slug' => 'visit']) . '#directions', + 'visit' => '/visit', + 'hours' => '/visit' . '#hours', + 'directions' => '/visit' . '#directions', 'buy' => 'https://sales.artic.edu/admissions', 'become-a-member' => 'https://sales.artic.edu/memberships', 'shop' => 'https://shop.artic.edu/', - 'collection' => route('collection'), - 'exhibitions' => route('exhibitions'), - 'events' => route('events'), 'about-us' => '/about-us', + 'collection' => '/collection', + 'exhibitions' => '/exhibitions', + 'events' => '/events', + 'about-us' => '/about-us', 'about-us-mission-and-history' => '/about-us/mission-and-history', 'about-us-leadership' => '/about-us/leadership', 'about-us-departments' => '/about-us/departments', @@ -188,7 +189,7 @@ private function composeTemplatesViews() 'follow-twitter' => 'https://twitter.com/artinstitutechi', 'follow-instagram' => 'https://www.instagram.com/artinstitutechi/', 'follow-youtube' => 'https://www.youtube.com/user/ArtInstituteChicago', - 'legal-articles' => route('articles'), + 'legal-articles' => '/articles', 'legal-employment' => '/employment', 'legal-venue-rental' => '/venue-rental', 'legal-contact' => '/contact', 'legal-press' => '/press', @@ -202,19 +203,19 @@ private function composeTemplatesViews() 'description' => 'Find all the information you need—plus helpful tips—to plan your visit', 'cta' => 'Start planning', 'image' => 'https://artic-web.imgix.net/b55a24a5-ab1c-453e-9ecd-e30ee5473f6e/navigation-thumbnail-visit.jpg', - 'url' => route('pages.slug', ['slug' => 'visit']), + 'url' => '/visit', 'children' => [ [ 'name' => 'Hours', - 'url' => route('pages.slug', ['slug' => 'visit']) . '#hours', + 'url' => '/visit#hours', ], [ 'name' => 'Admission', - 'url' => route('pages.slug', ['slug' => 'visit']) . '#admission', + 'url' => '/visit#admission', ], [ 'name' => 'Plan Your Visit', - 'url' => route('pages.slug', ['slug' => 'visit']) . '#plan-your-visit', + 'url' => '/visit#plan-your-visit', 'children' => [ [ 'name' => 'Museum Map', @@ -222,15 +223,15 @@ private function composeTemplatesViews() ], [ 'name' => 'Free Daily Tours', - 'url' => route('events', ['audience' => 3, 'type' => 6]), + 'url' => '/events?type=6&audience=3', ], [ 'name' => 'My Museum Tour', - 'url' => route('pages.slug', ['slug' => 'my-museum-tour']), + 'url' => '/my-museum-tour', ], [ 'name' => 'What to See in an Hour', - 'url' => route('highlights.show', ['id' => 3, 'slug' => 'what-to-see-in-an-hour']), + 'url' => '/highlights/3/what-to-see-in-an-hour', ], [ 'name' => 'Shopping and Dining', @@ -244,7 +245,7 @@ private function composeTemplatesViews() ], [ 'name' => 'Who's Visiting?', - 'url' => route('pages.slug', ['slug' => 'visit']) . '#whos-visiting', + 'url' => '/visit' . '#whos-visiting', 'children' => [ [ 'name' => 'First-Time Visitors', @@ -284,20 +285,20 @@ private function composeTemplatesViews() ], [ 'name' => 'Exhibitions', - 'url' => route('exhibitions'), + 'url' => '/exhibitions', 'class' => 'exhibitions', 'children' => [ [ 'name' => 'Current', - 'url' => route('exhibitions'), + 'url' => '/exhibitions', ], [ 'name' => 'Upcoming', - 'url' => route('exhibitions.upcoming'), + 'url' => '/exhibitions/upcoming', ], [ 'name' => 'Archive', - 'url' => route('exhibitions.history'), + 'url' => '/exhibitions/history', ], ], ], @@ -306,19 +307,19 @@ private function composeTemplatesViews() 'description' => 'Explore the works in our collection and delve deeper into their stories.', 'cta' => 'Start your discovery', 'image' => 'https://artic-web.imgix.net/fd36787d-a4f7-480c-8e34-11115a9d240a/navigation-thumbnail-art-and-artists.jpg', - 'url' => route('collection'), + 'url' => '/collection', 'children' => [ [ 'name' => 'Artworks', - 'url' => route('collection'), + 'url' => '/collection', ], [ 'name' => 'Articles & Videos', - 'url' => route('pages.slug', ['slug' => 'articles-and-videos']), + 'url' => '/articles-and-videos', ], [ 'name' => 'Research', - 'url' => route('collection.research_resources'), + 'url' => '/collection/research_resources', 'children' => [ [ 'name' => 'Library', @@ -340,15 +341,15 @@ private function composeTemplatesViews() ], [ 'name' => 'Publications', - 'url' => route('articles_publications'), + 'url' => '/articles_publications', 'children' => [ [ 'name' => 'Print Catalogues', - 'url' => route('collection.publications.printed-publications'), + 'url' => '/print-publications', ], [ 'name' => 'Digital Publications', - 'url' => route('collection.publications.digital-publications'), + 'url' => '/digital-publications', ], ], ], @@ -359,27 +360,27 @@ private function composeTemplatesViews() 'description' => 'Join us for a wide range of programs—there's something for visitors of all ages.', 'cta' => 'Check out the calendar', 'image' => 'https://artic-web.imgix.net/d335c986-7075-4753-a84f-9cb11876ac77/navigation-thumbnail-events.jpg', - 'url' => route('events'), + 'url' => '/events', 'children' => [ [ 'name' => 'Calendar', - 'url' => route('events'), + 'url' => '/events', ], [ 'name' => 'Daily Tours', - 'url' => route('events', ['type' => 6]), + 'url' => '/events?type=6', ], [ 'name' => 'Talks', - 'url' => route('events', ['type' => 5]), + 'url' => '/events?type=5', ], [ 'name' => 'Art Making', - 'url' => route('events', ['type' => 1]), + 'url' => '/events?type=1', ], [ 'name' => 'Member Programs', - 'url' => route('events', ['audience' => 2]), + 'url' => '/events?audience=2', ], ], ], @@ -407,7 +408,7 @@ private function composeTemplatesViews() [ 'name' => 'Visit', 'class' => 'u-hide@small+', - 'url' => route('pages.slug', ['slug' => 'visit']), + 'url' => '/visit', ], ], ];