Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Setting Path in Link Web Part to SubPage View modes: 
User avatar
Member
Member
Armysniper89 - 3/11/2013 4:48:49 PM
   
Setting Path in Link Web Part to SubPage
I have a Link control on a page template and I want it always to go to a sub page below it called All-Videos.aspx. Every page that uses this template is expected to have an "All-Videos.aspx" page below it...how can I set the link to go to it for the given page. I have tried "./All-Pages.aspx" but that returns "MySite/CMSPages/All-pages.aspx" as the url...that isnt useful.

User avatar
Member
Member
Accepted solutionAccepted solution
Armysniper89 - 3/11/2013 5:53:29 PM
   
RE:Setting Path in Link Web Part to SubPage
Ahhh K# you powerful little tool you. Figured out how to do this so I figured I would post it:

I edited the Link URL and added a Macro....

{%CurrentDocument.AbsoluteURL.Substring(0, CurrentDocument.AbsoluteURL.Length-5)%}/All-Videos.aspx

Unless there is a better way to do it. ;)

User avatar
Certified Developer 13
Certified Developer 13
kentico-jx2tech - 3/11/2013 7:46:11 PM
   
RE:Setting Path in Link Web Part to SubPage
Very nice :)

Here is one to handle extensionless urls...
{%CurrentDocument.AbsoluteURL.Substring(0, CurrentDocument.AbsoluteURL.LastIndexOf("/")) + "/All-Videos" %}