Documentation > CMS Template API Library > Asset > Show(String)

Show

Similar to "include" but instead evaluates another asset preview/output within its own context as opposed to the current asset context. This is often used to combine different templates to create a composite template.

public System.String Show(String)



Parameters

NameDescriptionType
layoutName

Name of output template file to render.

System.String

Code Example

C#

Sample:

            <!--basic homepage template-->
            <% Asset navAsset = Asset.Load(asset["nav_id"]); %>
            <% string featureOutput = Asset.Load(asset["feature_id"]).Show(); %>
            <table>
              <tr>
                <td colspan=2><%= asset.Show("stage_output") %></td>
              </tr>
              <tr>
                <td><%= navAsset.Show() %></td>
                <td><%= featureStageOutput %></td>
              </tr>
              <tr>
                <td colspan=2><%= Asset.Load("/Footer.html").Show() %></td>
              </tr>
            </table>
            

Connect with Crownpeak