CurrentPage.GetValue - How to just use inside an aspx template rather than transforms everywhere?

Tom F asked on December 2, 2016 03:20

Hi I was wondering if it's possible to do something like this in an aspx template rather than have to write a transform?

<div class="main-content-section">
    <div class="container">
        <% if (CurrentPage.GetProperty("PageContentLeft") != null && CurrentPage.GetValue("PageContentLeft") != null && !string.IsNullOrEmpty(CurrentPage.GetValue("PageContentLeft").ToString()))
            { %>
        <div class="row">
            <div class="col-md-8">
                <%= CurrentPage.GetValue("PageContentLeft") %>
            </div>
        </div>
        <% } %>
        <cms:CMSRepeater ID="ChildPageRepeater" Path="./%" MaxRelativeLevel="1" SelectOnlyPublished="true" TransformationName="CMS.MenuItem.ContentPageOverview" runat="server"></cms:CMSRepeater>
    </div>
</div>

Recent Answers


Anton Grekhovodov answered on December 2, 2016 06:10

Hi Tom,

Try to replace CurrentPage with CurrentDocument

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.