6

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?

5

Revert to the previously published version?

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

  • "Reset to Site Definition" did it. Thanks! – ScarePoint Apr 27 '11 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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