write path correctly to retrieve node alias

rajitha somarathna asked on October 23, 2015 13:35

I have added event page type and location page type and created pages using them.In the event page I use a drop down which is a collection of locations.By that i am select one location to the event.

Image Text

within the event page I need to retrieve the path of relevant location to display images under that node.

Image Text

so I tried to write path in the image gallery web part.

how can I do that?

Ps: for the locations value comes to <%# Eval("EventLocation") %> as its a alias path. so i tried to set path like {%# Eval('EventLocation') %} /% .it not woked., please help me

Recent Answers


Brenden Kehren answered on October 23, 2015 14:15

If you're using the document selector, it will store the DocumentGUID in the field so not sure this is the solution you need. You might check out Related Pages. You can have events related to locations with a few simple clicks and use some OOTB features with Kentico.

1 votesVote for this answer Mark as a Correct answer

rajitha somarathna answered on October 23, 2015 14:32

@Brenden Kehren :this is not hte solution i need.. i want to correctly write path.locations also a page type. those all location page types comes to event page drop down. i want to retrive its path to image gallery web part

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 23, 2015 15:16

Ok regarding your dropdown of locations, what is the value of the dropdown? As I mentioned, if you're using a document selector, it will be a GUID. So before I can provide a solution, I need to know what you're using for a control or value for your dropdown list items.

1 votesVote for this answer Mark as a Correct answer

rajitha somarathna answered on October 23, 2015 15:24

@Brenden Kehren : thanks for reply. fo the drop down i retrive values from sql query like

SELECT NodeAliasPath, NodeName FROM View_CMS_Tree_Joined WHERE NodeAliasPath LIKE '/Short-Breaks-and-Retreats/Regions/%' AND ClassName = 'custom.WF_Location'

so the selected value of the dropdown is the NodeAliasPath

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 23, 2015 17:32

Then what you have should work. What does your code for your transformation look like?

1 votesVote for this answer Mark as a Correct answer

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