This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hello, -I am currently using the EmbedTopic component on my CMS page, it works fine except for the generate slug which does not match what i want.
-
I set the embedCode = {{:slug}} so it matches my unique page slug but i want the topic's slug to also be the same. I tried different approaches but nothing seems to work
-
in Models\Topics createForEmbed()
if (!$topic) { $topic = new self; $topic->slug = $code; // set the slug = embedCode - Does not work $topic->slug = $embedSlug ; // added a custom page parameter = $slug = $code also does not work $topic->subject = $subject; $topic->embed_code = $code; $topic->channel = $channel; $topic->start_member_id = 0; $topic->save(); }
- The slug generate by the Topic Model most of the time omits the last digits from my URL, assuming the Url is :
example.com/my-cool-page-101
- The embedCode = 'my-cool-page-101'
- The Slug = 'my-cool-page-101'
-BUT I don't understand why the model returns a slug = 'my-cool-page' . This is annoying as I want the same exact match case for the topics because the digits represents unique entities so 'my-cool-page-101-1' for instance is not acceptable.
-Any idea where I should look into ?
- Thanks alot
Last updated
1-1 of 1