Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c19191d

Browse files
authored
Fix url from entries with Rapidez 5.x (#192)
1 parent e222452 commit c19191d

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/RapidezStatamic.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,14 @@ public function determineEntryUrl(Entry|Page|string|OptionalDeep $entry, string
9090
return $entry->url() ?? '';
9191
}
9292

93-
$suffix = match (true) {
94-
str($linkedRunwayResourceKey)->contains('category') => Rapidez::config('catalog/seo/category_url_suffix', ''),
95-
str($linkedRunwayResourceKey)->contains('product') => Rapidez::config('catalog/seo/product_url_suffix', ''),
96-
default => '',
97-
};
98-
99-
if (!isset($entry->{$linkedRunwayResourceKey}['url_path'])) {
93+
if (!isset($entry->{$linkedRunwayResourceKey}['url'])) {
10094
$this->navCache[$nav][$entry->id()] = '';
10195

10296
return '';
10397
}
10498

10599
$siteUrl = Str::finish(Site::current()->absoluteUrl(), '/');
106-
$urlPath = $entry->{$linkedRunwayResourceKey}['url_path'] . $suffix;
100+
$urlPath = ltrim($entry->{$linkedRunwayResourceKey}['url'], '/');
107101

108102
$this->navCache[$nav][$entry->id()] = $siteUrl . $urlPath;
109103

0 commit comments

Comments
 (0)