This project is read-only.

Shape Tracing for custom theme

Topics: Troubleshooting, Writing themes
Jul 31, 2012 at 4:00 PM

Hi All,

I wrote custom theme and want to adjust several custom content types for better visualization. Best tool for that is Shape Tracing...


When I use default Orchard Them is work fine, when I switch CMS on my theme, shape tracing disappeared. What i miss? should i create a special zone in layout for shape tracing module?

Jul 31, 2012 at 5:02 PM

Please try to compare your layout and document files with the default ones and restore any changes you have one by one. You'll find it.

Aug 1, 2012 at 9:14 AM

If you override in own scheme document.cshtml don't forget inside it use Model.Tail zone, otherwise Shape Tracing will not work.

@using Orchard.Mvc.Html;
@using Orchard.UI.Resources;
  if( MvcHtmlString.IsNullOrEmpty( Html.Title() ) ){
    string title = Model.Title;
    string siteName = WorkContext.CurrentSite.SiteName;
    Html.AddTitleParts( siteName, title );
<!DOCTYPE html>
<html lang="@WorkContext.CurrentCulture" class="dyn @Html.ClassForPage()">
    <meta charset="utf-8">
    <!-- Mobile Browsers Support enabled : Start -->
    <!-- Mobile Browsers Support enabled : End -->
    <!-- Facebook tagging : Start -->
    <!-- Facebook tagging : End -->
    <!-- Header Dynamic Section : Start -->
     @Display( Model.Head )
    <!-- Header Dynamic Section : End -->
    <!-- Body Dynamic Section : Start -->
    @Display( Model.Body )
    <!-- Body Dynamic Section : End -->
    @Display( Model.Tail )

Sep 3, 2012 at 9:41 PM

Is this the only reason for it to not work properly?

There are still some zones that don't show up properly etc; and I know that much of it breaks when I remove <article> wrappers etc.

Is there any documentation on how Shape Tracer actually works?


Sep 12, 2012 at 11:35 PM

Yes. If you don't have the Head zone, head scripts won't be rendered, and if you don't have the Tail zone, foot scripts and shape tracing won't get rendered.

What do you want to know about shape tracing?