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?

Coordinator
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()">
  <head>
    <meta charset="utf-8">
    <title>@Html.Title()</title> 
    <!-- Mobile Browsers Support enabled : Start -->
    @Display.Mobile()
    <!-- Mobile Browsers Support enabled : End -->
    <!-- Facebook tagging : Start -->
    @Display.Facebook()
    <!-- Facebook tagging : End -->
    <!-- Header Dynamic Section : Start -->
     @Display( Model.Head )
    <!-- Header Dynamic Section : End -->
  </head>
  <body>
    <!-- Body Dynamic Section : Start -->
    @Display( Model.Body )
    <!-- Body Dynamic Section : End -->
    @Display( Model.Tail )
  </body>
</html>

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?

thanks

Coordinator
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? http://docs.orchardproject.net/Documentation/Customizing-Orchard-using-Designer-Helper-Tools