Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > How to use document aliasing View modes: 
User avatar
Member
Member
m.rutter - 11/9/2009 4:30:12 AM
   
How to use document aliasing
Hi everybody.

I created an Home Page (HP) template which I need to share between many sites of the same company (site1.company.com and site2.company.com).

In the HP template I placed two News List webparts each of them points to a specific document (that has child nodes of type News).

Everything works fine for site 1. NewsListLeft points to "/Main/News/%" (see Content.Path) and NewsListRight points to "/Main/Alerts/%".

However the second site is structured in the same manner (news on the left and on the right - same home page template) but the news sources are different. NewsListLeft should point to "/Main/News/%" and NewsListRight should point to "/Main/FromTheWorld/%".

Ok, I thought to create an alias for each base document:

On site1:
/Main/News -> alias is /Main/LNews
/Main/Alerts -> alias is /Main/RNews

On site 2:
/Main/News -> alias is /Main/LNews
/Main/FromTheWorld -> alias is /Main/RNews

Now, if I modify the HO template and I change Content.Path in both the NewsList web parts so they point to the aliases I just created the component does not select any content. It seems that the News List Content.Path property does not resolve the aliases.

Any idea how can I resolve this issue? Do you have a workaround?

Many thanks for any answer.

Kind regards,
Marcello

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 11/18/2009 10:27:04 AM
   
RE:How to use document aliasing
Hello,

the described usage of domain aliases unfortunatelly won't work. The document alias defines a point (url) that can be used to access the document, however it isn't connected with Path specification in webparts. The aliases doesn't change or extend paths based on the content tree structure.

For your aims, if you still want to use one common home page template, you could clone the NewsList webpart and implement some logic that will suply the path settings according to the current site.

Hope this makes sense.

Best Regards,
Zdenek C.

User avatar
Member
Member
m.rutter - 11/18/2009 12:04:17 PM
   
RE:How to use document aliasing
Hi Zdenek,
thank you for your answer and support.

Finally I decided to clone the Home Page because in this type of Kentico implementations I prefer to not clone and/or modify standard web parts to avoid issues when updating base libraries.

Thank you.