Repoint GroupProfileURL

Sherry Collins asked on June 22, 2015 23:01

We have taken the Intranet Portal that comes with kentico and are customizing it. There is a Workgroups Section that we renamed Team-Up. On our Team-up home page we are listing all the teams the user belongs to and all the teams available. When the user clicks on his/her Team Name it should evaluate the GroupName and open a page called Team-Up/Marketing.aspx.

I believe this is the offending markup

<h3><a href="<%# GetGroupProfileUrl(Eval("GroupName",true)) %>" title="<%# Eval("GroupDisplayName",true) %>"><%# HTMLEncode(LimitLength(Eval("GroupDisplayName",true), 70, "...")) %></a></h3>

When I click on the Team Name it tries to open a page called Workgroups/Marketing.aspx. It looks like the GetGroupProfileUrl is returning Workgroups. Is there some way I can get it repointed to Team-Up. I have had to make the change in several other places but they were easy to find. This one is not.

Any help is appreciated.

Recent Answers

Joshua Adams answered on June 23, 2015 19:27 (last edited on June 23, 2015 19:29)

Inside of the binding, you could do a function to replace the value that it produces and go to your custom page. The markup should look similar to this:

<h3><a href="<%# GetGroupProfileUrl(Eval("GroupName",true)).ToString().ToLower().Replace("workgroups/marketing.aspx","Team-Up/Marketing.aspx") %>" </h3>

That should produce the correct results I would imagine. Just make sure the string you are replacing matches what the href is producing currently and you should be good.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.