Multiple Slugs / route for the same entry #9682
-
HI, We are trying to work through an edge case of our business when tracking the source from various marketing channels. We do this by having unique URLs rather than relying on query string data. The landing pages are essentially the same and my question is what would be the best way to have the same entry from a collection, but with a different slug ( without duplicating the page ). I have started testing with the traditional laravel routes file, but can't find anything in the docs about passing entry data into a view: Route::get('b', function (){
$data = \Statamic\Facades\Entry::find('6754106f-7fa7-4604-83db-ca1e278e863b');
return (new \Statamic\View\View)
->template('ppc.index-962525022')
->layout('squeeze')
->with($data); //won't work
}); Before I dig around the codebase, I wondered if anyone had any pointers? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Maybe try |
Beta Was this translation helpful? Give feedback.
Maybe try
->with($data->toAugmentedArray())
?