MicroStrategy ONE

Layout Definitions

Layout definitions provide a flexible and a code-free approach to modifying the arrangement and content of the output rendered by a transform. You simply modify an XML file, called a layout definition file, that includes both regular HTML elements and also MicroStrategy custom tags that represent content from a transform associated with the layout definition. The transform content is typically well-defined sections of the transform output, such as the name of the object or the action links in the folder browser transform. All layout definition files are located under WEB-INF/xml/layouts in the MicroStrategy installation directory. 

A layout definition file is associated with a transform in a style in the Style Catalog Configuration file, as illustrated in the code sample below.

<Styles>

  ...

  <Style description="Style: Display Report Graph for Printing" name="ReportGraphStyle-ForPrint" transform="ReportGraphTransform">

    ...

    <Layouts>

      <Layout layout_source="AppLayoutSourceFile" order="1">

        <![CDATA[/WEB-INF/xml/layouts/ReportGraphOnlyLayout.xml]]>

      </Layout>

    </Layouts>

  </Style>

  ...

</Styles>

The CDATA command informs the XML parser not to apply its rules to the following character data and render it even if the XML is incorrectly constructed.

The <LayoutParserDefn> node in styleCatalog.xml determines the parser used to parse the XML in the layout definition file, and the <LayoutSourceDefn> node determines where the layout definition is found.

<Styles>

  ...

  <LayoutParserDefns global_parser="AppLayoutParser">

    <LayoutParserDefn name="MSTRLayoutParser" class="com.microstrategy.web.transform.MSTRLayoutParser"/>

    ...

  </LayoutParserDefns>

  ...

  <LayoutSourceDefns>

    <LayoutSourceDefn name="AppLayoutSourceFile" class="com.microstrategy.web.app.transforms.AppLayoutSourceFile"/>

    ...

  </LayoutSourceDefns>

Layout definition files are not required to define a style, but they do provide a convenient way to customize the level of details you want to display or modify the arrangement of content on the page without needing to write Java code.

You do not need in-depth knowledge of transforms for basic customizations such as modifying the arrangement of content or level of detailed information. However, advanced customizations that include overriding methods that generate HTML do require thorough understanding of transforms and their implementation.

The following topics in this section provide details about how layout definition files are constructed, the special nature of prompt-related layout definition files, the  MicroStrategy custom tags used in layout definition files, and a list of all layout definition files provided by MicroStrategy web.

  • Structure of a Layout Definition File

    Provides information about the XML structure defined in the MicroStrategy layout document type definition file and a detailed example of how a layout definition file is created.  

  • Layout Definition Architecture

    Discusses the underlying architecture of layout definitions , how they are used in MicroStrategy Web, and  the advantages of using them.

  • Modifying a Style by Changing the Layout Definition

    Discusses the underlying architecture of layout definition filess and how they are used in MicroStrategy Web. It highlights the advantages of using layout definitions. Explains the steps required for associating a layout definition with a style. It describes the changes that need to be made to the Style Catalog Configuration file.

  • Layout Definitions for Rendering Prompts

    Provides information on how layout definition files are used for rendering prompts. It explains the concept of using a template layout definition file.  

  • Layout Definition Elements Reference

    Lists all the MicroStrategy custom tags that are commonly used in a layout definition file. It provides technical information about how layout definition files are used for placing and rendering the content.  

  • List of Layout Definition Files

    Lists all the layout definition files provided by MicroStrategy Web. It provides information about the location where they can be found and the MicroStrategy Web features where they can be used.