KenticoDevTrev / DynamicRouting

Dynamic Routing in Kentico using a Routing Table and Assembly Attribute
15 stars 5 forks source link

Dynamic Routing #24

Closed geoneeliyara closed 4 years ago

geoneeliyara commented 4 years ago

Hi

I tried to setup Dynamic Routing on my Kentico 12 MVC project but couldn't succeed on this. Do you have any running example on this? Or would you be able to show an example on Landing Page section in Dancing Goat website. I am confused with the steps 3 & 4 under the heading "Installing on the MVC Site". Would you be able to help me on this

Regards, Geo

KenticoDevTrev commented 4 years ago

My recent blog article on devtrev.com goes through the setup of a basic site that uses this, although more to come in part two later this month.

But for steps three and four, you don't need to do these steps, they are just modifying the default behavior through Kentico settings and allowing not global administrators ui access. Step 5 will be more important. Make sure your page types have a proper url pattern, {% nodealiaspath %} is the best.

On Mon, Mar 23, 2020, 5:34 AM geoneeliyara notifications@github.com wrote:

Hi

I tried to setup Dynamic Routing on my Kentico 12 MVC project but couldn't succeed on this. Do you have any running example on this? Or would you be able to show an example on Landing Page section in Dancing Goat website. I am confused with the steps 3 & 4 under the heading "Installing on the MVC Site". Would you be able to help me on this

Regards, Geo

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KenticoDevTrev/DynamicRouting/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIDDUYIVZEWD4FSTLVMUEDRI43M7ANCNFSM4LRYOMNQ .

geoneeliyara commented 4 years ago

Hi

I have the url pattern as {%nodealiaspath%} and I rebuild the site as per step 5. I tried the above on Dancing Goat MVC website but i am still getting error while accessing the page.

The live url still shows http://localhost:51872/Kentico12_DancingGoatMvc_1/en-US/Landing-pages/Coffee-samples . looks like I am missing something. Would you be able to find the issue

Regards, Geo

KenticoDevTrev commented 4 years ago

Your site is using a culture prefix, you either need to add these to the url pattern so the slugs generate with the culture "/{% documentculture%}{% nodealiaspath%}" , or add event hooks to the dynamic routing global events to detect the culture from the URL so it can properly remove it from the actual path to check.

On Mon, Mar 23, 2020, 11:12 AM geoneeliyara notifications@github.com wrote:

Hi

I have the url pattern as {%nodealiaspath%} and I rebuild the site as per step 5. I tried the above on Dancing Goat MVC website but i am still getting error while accessing the page.

The live url still shows http://localhost:51872/Kentico12_DancingGoatMvc_1/en-US/Landing-pages/Coffee-samples . looks like I am missing something. Would you be able to find the issue

Regards, Geo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KenticoDevTrev/DynamicRouting/issues/24#issuecomment-602701070, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIDDU7VDMITC3H5ES7WGXTRI6C7JANCNFSM4LRYOMNQ .

geoneeliyara commented 4 years ago

Hi I updated the url pattern as "/{%documentculture%}{%nodealiaspath%}". But i am still getting error while accessing the page. it shows "object ref not found" on var cultureName = requestContext.RouteData.Values["culture"].ToString();. Sorry to distrub you on this again and again. I didn't really get the full logic behind the dynamic routing.

KenticoDevTrev commented 4 years ago

Shoot me an email, tfayas@hbs.net and i'll schedule a screen share to go over it with you.

KenticoDevTrev commented 4 years ago

This item is now resolved, it was an issue using the Dancing Goat's system which had the Culture determined in the URL and was not properly catching errors there. No issue with the module itself.