This project is read-only.

The relative virtual path 'Orchard.Core.Shapes.CoreShapes::Zone' is not allowed here

Topics: Customizing Orchard, Troubleshooting
Jul 27, 2011 at 6:21 PM

Hello all,

I was trying to follow the video there entitled 'getting started with custom theme development'

I followed the directions in the video with some exceptions - i downloaded the zip version of orchard and I'm not using web matrix. If i need to do any code changes it'll be done either using notepad+ or visual studio. anyhow, i downloaded the zip of orchard and set it up under a new site in IIS7.5 - seems to be working ok. I then installed the codegen and designer tools modules. I created a new theme based on the contoso theme. I then tried using the designer tools to change the footer. but when I go to the zone [footer] Or the subzone under it called badgeofhonor and try to create an alternate zone, i get the following error: 

The relative virtual path 'Orchard.Core.Shapes.CoreShapes::Zone' is not allowed here.

Any ideas what i am doing wrong? i realize i can edit the badofhonor.cshtml file in the contoso theme folder, but that sort of defeats the purpose of creating my own theme based off of it. 

On a side note - how come the footer isn't editable with the designer controls? What would be the correct method of adding a footer to every page of the site, but still allowing someone to go in and edit the footer without having to edit actual files?


edit: i also just noticed this in the trace: 

   System.Web.Hosting.VirtualPathProvider.FileExists(String virtualPath) +25
No such file/path exists on my machine - i have orchard on the C drive.
Jul 27, 2011 at 7:33 PM

first, you can ignore the D:\Teamcity paths, those are due to the compiler embedding debugging information as it knows it from the machine that was used to build the dlls.

What do you mean by "an alternate zone"? I'm assuming you mean an alternate template for the badge of honor shape. Does this happen when you click "create" from shape tracing? If so, it sounds like a bug that you should file in the issue tracker.

One thing you can do instead is copy the badgeofhonor.cshtml file that's in contoso/views and drop it into your own theme's views directory. That will replace it, and you can edit it any way you want.

Jul 27, 2011 at 7:46 PM

Apologies on not using the correct terminology. I'm brand new to orchard so i haven't picked up all the correct terms yet. I actually did get the badgeofhonor to work correctly. What i was trying to do was edit the header zone.  But i noticed that the active template for the header zone isn't a cshtml file, it's Orchard.Core.Shapes.CoreShapes::Zone - so i guess i'd have to muck around with the source code to change that? For now I was able to instead edit the Branding instead to do what i wanted - i guess that's what i was supposed to do? 

Could you tell me how i could set it so that something like the header and footer is an editable zone but one that would appear by default on every new page? By editable, i mean within the UI, and without having to actually edit any template files?

Thank you

Jul 27, 2011 at 7:52 PM

I'm the one who should apologize if I sounded harsh. I only wanted to clarify and verify that I understood.

It's important to understand the difference between a zone and other shapes: the zone is just a container to which other shapes can be added. In your case, you do not want to change the zone, you want to change one of the things that is inside. Why do you think you need to change the header zone? If you just want to put some editable content in one of these places, all you have to do is go to the admin, in the widget section, and add an HTMLWidget.

Jul 27, 2011 at 8:13 PM

You didn't sound harsh at all. I appreciate you taking the time to help me and just wanted to apologize in case my request was confusing because i was mixing up my terminology.

As to why i wanted to change the header - i wanted to remove the text version of the site name and replace it with a graphic. I did that by editing the branding.cshtml file. 

But i think i see what you are suggesting. For the footer, if i wanted to make it so that it was editable bit still appeared on every page i'd just add an html widget to the footer for the default layer. I'll have to read the documentation more extensively so i understand how i can manipulate these things.

Thanks for your help