Jump to:

5521 Posts in 1734 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Components

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1122 Views
  • tgwpqd
    Avatar
    Community Member
    7 Posts

    Components Link to this post

    How to use sibling menu component to call the linkedpage's content?

    I try $LinkedPage.Content, but it does not work. However, the $LinkedPage.Author and $LinkedPage.Date are working fine. (BTW, the content under the subpage is created by components HTML Editor.)

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Components Link to this post

    Why not try something like <% control ChildrenOf(page-url) %>$content<% end_control %>?

    There is also <% control Children %> which will loop all children of page if you have more than one.

  • tgwpqd
    Avatar
    Community Member
    7 Posts

    Re: Components Link to this post

    I have been asked to use components in CMS and all the page based on page.php

    To do that, firstly, create template.ss and template-Edit.ss to control the components in the CMS, which means the content is not allow to write again. To edit the content, need to grab such as "HTML Editor" to create the content. And the main and mata_data in under a new one called Page Porperties.

    the template.ss looks like:
    <% control retrieveSlotItems(A) %>
          <div class="slot sort$Sort $Component.class">
             $Component
          </div>
       <% end_control %>

    the template-Edit.ss looks like:
    <div id="slots">
       <table cellspacing="10">
          <tr>
          <td id="SlotA" class="slot" style="width:75%;height:211px">
             <% control retrieveSlotItems(A) %>
                $EditSegment
             <% end_control %>
          </td>
          </tr>
       </table>
    </div>

    1122 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.