Problem:
The table draws and populates as desired but for one thing...
<a href="@page.URL">@page.pageTitle</a>
The URL of each of the child pages isn't right.. each row of the table has the right Title, and the other columns are correct, but the anchor is being formed with the URL of the CurrentPage rather than each Child's .Url. I assume I am doing something wrong, but I cannot see why this isn't working.
Hi I suspect that if you look at the html source of the page the href of the link will be empty which is why when you click on the link it looks as if the url of the current page has been inserted into the view.
However the problem is that page.URL has not returned anything as it should be page.Url, the CamelCase makes a difference. Could be a typo but here's a reference of default iPublishedContent properties just in case.
7.3.1 Problem with CurrentPage.Children
Consider this code:
Problem: The table draws and populates as desired but for one thing...
The URL of each of the child pages isn't right.. each row of the table has the right Title, and the other columns are correct, but the anchor is being formed with the URL of the CurrentPage rather than each Child's .Url. I assume I am doing something wrong, but I cannot see why this isn't working.
Any suggestions?
Thanks! Gerry
hi
i think URL is case sensitive so it should be @page.Url ?
Hi I suspect that if you look at the html source of the page the href of the link will be empty which is why when you click on the link it looks as if the url of the current page has been inserted into the view.
However the problem is that page.URL has not returned anything as it should be page.Url, the CamelCase makes a difference. Could be a typo but here's a reference of default iPublishedContent properties just in case.
https://our.umbraco.org/documentation/reference/querying/IPublishedContent/Properties
sigh Yes, you're right Kevin. I feel pretty dumb right now.
Thank you as well to Ian. I knew it was camel case but apparently I am not on my game today.
is working on a reply...