zoneproxy message

Topics: Writing modules
Jun 11, 2012 at 6:27 AM

I'm pretty sure I've seen this posted somewhere before, but I searched the entire forum and couldn't locate it.

I'm playing around with the Contrib.Profile module and trying to render the Profile_Head shape in a different zone. The original module has a file named Index.cshtml in the Views folder that reads:

@Display(New.Profile_Head(ContentItem: Model.ContentItem))
@Display(New.Profile_Tail(ContentItem: Model.ContentItem))

If I change the first line to:

@Layout.BeforeContent.Add(New.Profile_Head(ContentItem: Model.ContentItem), "1")

I get the "title" to appear in the BeforeContent zone as desired, but I'm also getting the following message in the Content zone:


Any idea what causes this and how to get rid of it? Thanks =)

Jun 11, 2012 at 7:31 AM
Edited Jun 11, 2012 at 7:31 AM

Try:  @{Layout.BeforeContent.Add(New.Profile_Head(ContentItem: Model.ContentItem), "1")}

Jun 11, 2012 at 7:06 PM

Yep,,,that was it. Thanks for the reminder on having to surround it with curly braces...also have to add a semi-colon at the end before the curly brace.'s a follow up question. Can I override this file in my theme? Since it's named Index.cshtml, I'm assuming I need to put it in some sort of directory structure so that Orchard knows it's supposed to override the Contrib.Profile module's Index.cshtml file. What would that directory structure look like in my theme if this is possible? Thanks!