Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a Page Layout which is used by some Publishing Pages, and uses code-in-front like <%= DateTime.Now %>.

I opened this Page Layout in SharePoint Designer and modified it and saved it, and now it says

Page cannot contain code blocks

My first idea was to manually revert the Page Layout to its previous state (again using SharePoint Designer), but that solved nothing, presumably since the page itself isn't broken.

Then I wanted to delete the Page Layout and re-install it, but that's not possible since it's in use by Publishing Pages. Or is it?

Then I wanted to allow code blocks for this particular page by adding PageParserPaths, but I don't know which VirtualPath my Page Layout has.

How can I repair my Page Layout?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Revert to the previously published version?

Unghost the file? ("Revert to Site definition" option in Site Settings).

share|improve this answer
    
"Reset to Site Definition" did it. Thanks! –  ScarePoint Apr 27 '11 at 15:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.