how to check if a path exists using macros

Rakesh Pinnamaneni asked on April 28, 2015 22:37

How can I check if a path exists to a page. I need to enter library path on page, the folders will be keep changing and i need to make sure the path to the folder exists how can i do that using macros.

Correct Answer

eSiteful Corporation answered on April 28, 2015 23:33

You can see if the document exists by path with the following:

{% if(Documents.Columns("NodeAliasPath").Where("NodeAliasPath = '/Home'").Count > 0){ %}
{% } %}
3 votesVote for this answer Unmark Correct answer

Recent Answers

Rakesh Pinnamaneni answered on April 29, 2015 22:40

Thank you eSiteful Corporation

0 votesVote for this answer Mark as a Correct answer

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