Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I know CurrentPage, but how can i use homepage.alias?
Try
@{ var homepage = Umbraco.TypedContentAtRoot().FirstOrDefault(); }
This will get the first root node in your content tree.
In my base project I'm also using
CurrentPage.Site()
But note sure where that came from to be honest as a quick google doesn't find much and its not a custom extension I have wrote.
Hi Carl,
One of the new features in Umbraco 7.2 back when it was released was the query builder. The purpose with the query builder was to make eaier for new people to Umbraco to get data our of the system.
http://umbraco.com/follow-us/blog-archive/2014/12/4/umbraco-72-released
So instead of this:
@CurrentPage.AncestorOrSelf(1);
Then you can do:
You can hear more about the query builder in the keynote from the last year CodeGarden in Copenhagen. http://stream.umbraco.org/video/9918428/umbraco-codegarden-14-keynote
If you donĀ“t want to see the whole keynote then the part about the query builder starts in the 26 minute.
Hope this helps,
/Dennis
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
how can i use another page
I know CurrentPage, but how can i use homepage.alias?
Try
This will get the first root node in your content tree.
In my base project I'm also using
But note sure where that came from to be honest as a quick google doesn't find much and its not a custom extension I have wrote.
Hi Carl,
One of the new features in Umbraco 7.2 back when it was released was the query builder. The purpose with the query builder was to make eaier for new people to Umbraco to get data our of the system.
http://umbraco.com/follow-us/blog-archive/2014/12/4/umbraco-72-released
So instead of this:
Then you can do:
You can hear more about the query builder in the keynote from the last year CodeGarden in Copenhagen. http://stream.umbraco.org/video/9918428/umbraco-codegarden-14-keynote
If you donĀ“t want to see the whole keynote then the part about the query builder starts in the 26 minute.
Hope this helps,
/Dennis
is working on a reply...