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)
Returns
Render output.
Parameters
Name | Description | Type |
---|---|---|
layoutName | Optional: Name of output template file to render. Defaults to "output". | System.String |
Code Example
C#
Sample:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <!--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> |