Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > cutting part of url View modes: 
User avatar
Member
Member
pavel.1991-tut - 4/12/2013 4:24:35 AM
   
cutting part of url
I have next document tree structure:
root -> news -> news1, news2, news3, ...
News url must be like this:
www.mysite.com/news1
www.mysite.com/news2
www.mysite.com/news3

Now news url looks like this:
www.mysite.com/news/news1

I do not want to appoint alias to every news that news do not have this part "/news/". How can I cut "/news/" from url for all pages?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 4/12/2013 4:44:30 AM
   
RE:cutting part of url
Hi Pavel,

This option is currently not available in the Kentico 7, but it is a requirement which will be available in the upcoming versions.

There is however a workaround which could be applied to your situation. You will need to use Global Events which would fire when a new document is created. Now after the document is created you would change the document alias as it is described here.

Currently there is no better way of achieving this scenario.

Kind regards,
Richard Sustek

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 4/12/2013 7:31:14 PM
   
RE:cutting part of url
Richard couldn't they use a URL Alias for the news doc types? It would simply be /News1. And as long as the alias didn't redirect to the actual published URL it should display site.com/news1.

Only downfall is for every new news item an alias would have to be created. Guess this could be done as a global handler.

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 4/17/2013 1:07:33 AM
   
RE:cutting part of url
Hey,

Yeah, that is exactly what I had in mind:) Using the Global events to fire upon the creation of a new document and "updating" the alias in the code.

This is the only reasonable way of doing this. But as I have said, some more options for configuring URL's are coming in the new version.

Kind regards,
Richard Sustek