It was probably published at the time it was deleted. But yes - very strange.
Thanks for the link. I've just looked it over. I've only been using Razor for a shorter period (4-5 month) so I've got some to learn. Your link points to MVC templating and related stuff. I seen the page before but there's no hint that its relevant to me wanting do code razor macros in a masterpage controlled solution.
That documentation is if you run in MVC mode so all your templates are already Razor views.
However you can also create a macro for a masterpage controlled solution which is using these new techniques. It's called a partial view macro. There isn't a lot of documentation about it yet, but in the developer section there is a "Partial View Macro Files" tree. That will also create a Razor Macro, but with all the new (and faster!) techniques like IPublishedContent. It's beter to create a macro as a "Partial View Macro Files" instead of the old legacy (and slow) "Scripting Files" macro.
Razor - How to check if content is in the recycle bin?
This code breaks if one of the childpages is in the recycle bin. How to proper check if stuff is deleted?
Best
Jesper
}
If it's in the recycle bin it's unpublished so it shouldn't even be accessible in Razor. Strange that you get this exception.
What version of Umbraco are you using? This is the old and legacy Razor macro code. You should use new Razor code: http://our.umbraco.org/documentation/reference/Templating/Mvc/
Jeroen
It's Umbraco 6.16.
It was probably published at the time it was deleted. But yes - very strange.
Thanks for the link. I've just looked it over. I've only been using Razor for a shorter period (4-5 month) so I've got some to learn. Your link points to MVC templating and related stuff. I seen the page before but there's no hint that its relevant to me wanting do code razor macros in a masterpage controlled solution.
So I'm confused :-)
/Jesper
That documentation is if you run in MVC mode so all your templates are already Razor views.
However you can also create a macro for a masterpage controlled solution which is using these new techniques. It's called a partial view macro. There isn't a lot of documentation about it yet, but in the developer section there is a "Partial View Macro Files" tree. That will also create a Razor Macro, but with all the new (and faster!) techniques like IPublishedContent. It's beter to create a macro as a "Partial View Macro Files" instead of the old legacy (and slow) "Scripting Files" macro.
Jeroen
Thank you Jeroen. Very valuable information. I'm gonna try using partials instead.
Thanks again,
Jesper
is working on a reply...