Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Action which renders a template in the Sidebar

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1402 Views
  • teejay
    Avatar
    Community Member
    63 Posts

    Action which renders a template in the Sidebar Link to this post

    Hi,

    I have maybe a very simple problem but I have no Idea for the moment. I have created a action in my news page controller which shall render a template in my sidebar. I just want to populate text data in the sidebar.

    Any ideas how to do that ?

    Regards Thomas

  • yuqinz
    Avatar
    Community Member
    1 Post

    Re: Action which renders a template in the Sidebar Link to this post

    Just call the $ActionName in the sidebar.ss

  • teejay
    Avatar
    Community Member
    63 Posts

    Re: Action which renders a template in the Sidebar Link to this post

    after another 30 minutes I have done the following and I came to the same conclusion than you

    Archive.ss

    <% if GetArchive %>
    <div class="sidebarBox">
    <h3>Sub Menu</h3>
    <% control GetArchive %>
    <p>$Title</p>
    <% end_control %>   
    </div>
    <% end_if %>


    this is an include file to encapsulate it a little bit.

    But is it possible to render the template from the controller level. Before this SilverStripe I have done mostly everything with Zend Framework and Silverstipes architecture is completely different to the Zend approach, thats why I am often a little bit confused how to do things in Silverstripe.

    But anyway Silverstripe has some nice functions

    Regards Thomas

    1402 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.