Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to set SEO url for Product
OlegO
#1 Posted : Wednesday, July 28, 2010 9:19:08 PM(UTC)
Rank: Newbie
Groups: Registered

Joined: 7/28/2010(UTC)
Posts: 6
I'm testing a product few days and pleasantly surprised. Good work.

But I have a question. How do I define a complete SEO Url from Site Root for product?

Now, I could modify User Key to ProductAAA and url would be
http://localhost:8080/Product/detail/ProductAAA

But I want to assign direct
http://localhost:8080/ProductAAA
url with product.

I should create a custom routes and custom Url Creator or I can use default methods??

GazNewt
#2 Posted : Wednesday, July 28, 2010 9:37:54 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Hi OlegO,

I don't know of a built in way of doing this. The amazing Kooboo developers are talking about building in some kind of mapping utility where specific urls map to Kooboo pages. For your request they would need to allow the user key and parhaps custom route values into the mapping too.

http://forum.kooboo.com/yaf_postst568_Virtual-root-pages.aspx

You could write a module that plugs into the /Product page, inspect the routes and render the product page. That way you get /detail/ out of the url and are only left with /Product. I think you could achieve the same in the Page_Load() event in a content template too

Hope this helps, someone else may provide a better answer
OlegO
#3 Posted : Wednesday, July 28, 2010 10:02:50 PM(UTC)
Rank: Newbie
Groups: Registered

Joined: 7/28/2010(UTC)
Posts: 6
No, problem I can add SeoUrl field to product and create custom CreateProductUrl function (would return SeoUrl or default if SeoUrl is empty).

But I should rewrite path from my url to correct Kooboo url before processing.
Where I should override default routing?
GazNewt
#4 Posted : Wednesday, July 28, 2010 10:15:29 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
I'm not sure what you want to do exactly, but in Kooboo you can edit routes in the Routes.config file
OlegO
#5 Posted : Wednesday, July 28, 2010 10:30:28 PM(UTC)
Rank: Newbie
Groups: Registered

Joined: 7/28/2010(UTC)
Posts: 6
GazNewt wrote:
I'm not sure what you want to do exactly, but in Kooboo you can edit routes in the Routes.config file

I want to create a custom URL for my product.

As I said above, I don't see any problem to create a correct link with custom URL.
But when user click on custom link.
I would intercept it, then find a product by custom Url, replace URL and send for processing default.

In routes.config, I've found Common and CommonInDNSHost rules.
So, Could I create a custom controller inherited from CommonController class?

Which functions should be overridden Where I should implement several steps:

1. Find product by current path
2. If I've found product, replace path to correct, current KooBoo path
3. Run default processing
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.094 seconds.