MicroStrategy ONE

PromptBaseLayout.xml (Server-side layout definition file)

As the name suggests, the server-side layout definition file, PromptBaseLayout.xml, is the base file that defines the layout for all prompts in MicroStrategy Web. It is inherited by all server-side layout definition files responsible for displaying the different types of prompts. PromptBaseLayout.xml is available in the WEB-INF\xml\layouts\widgets folder of the MicroStrategy Web installation.

PromptBaseLayout.xml defines slots for two blocks, PromptQuestionView (view block that represents an individual prompt) and PromptQuestionModel (model block that represents an individual prompt) as shown in the code below. The isDisplayingModel method determines whether to fill in the slot for the view or the model block based on the boolean value passed by PromptsContainerLayout_widget.xml. It uses the prompt's server-side layout definition file (referenced by the prompt style) to display the individual components within the view and model blocks. See Representation of PromptEditor (View block) and Representation of ReportInstanceModel (Model block) topics for an explanation of how this boolean value gets passed.

Copy
<!DOCTYPE mstrlayout:layout SYSTEM "mstrlayout.dtd">
<mstrlayout:layout>
...
...
<mstrlayout:if method="isDisplayingModel">
    <mstrlayout:then>
      <mstrlayout:block name="PromptQuestionModel">
        <mstrlayout:bSetProperty path="index" method="getPromptIndex"/>
<!--         <mstrlayout:bSetProperty path="type" value="CONSTANT"/> -->
        <mstrlayout:bSetProperty path="n" method="getPromptName"/>
        <mstrlayout:bSetProperty path="namePrefixForSingleSavedAnswer" method="getNamePrefixForSingleSavedAnswer"/>
        <mstrlayout:bSetProperty path="title" method="getPromptTitle"/>
        <mstrlayout:bSetProperty path="meaning" method="getPromptMeaning"/>
        <mstrlayout:bSetProperty path="instructions" method="getRestriction"/>
 
        <!--=================== slot for content of model =======================-->
        <mstrlayout:slot name="modelContent"/>
          ...
          ...
      </mstrlayout:block>
    </mstrlayout:then>
    <mstrlayout:else>
      <mstrlayout:block name="PromptQuestionView">
 
         <!-- ============== slot for view ======================= -->
         <mstrlayout:slot name="viewContent"/>
        ...
        ...
               </mstrlayout:block>
      </mstrlayout:else>
    </mstrlayout:if>
</mstrlayout:layout>