Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Need help

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 613 Views
  • Webdoc
    Avatar
    Community Member
    332 Posts

    Need help Link to this post

    If I have set some info in Projects what is ProjectsHolder what has diffrent ProjectPages under it and the info is Shown in sidebar how i can control that the ProjectHolder sidebar on every page and containing the info From The Projectholder Allowed childrens.

    Thanks

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Need help Link to this post

    Or is there a way to make a widget that is showing the info of Projectholder
    if there is what to i need to write to the code

    Is it something like that
    <% control Children of(Projects) %>

  • carlos
    Avatar
    Community Member
    41 Posts

    Re: Need help Link to this post

    Hi Webdoc.

    Do you want to list children of ProjectHolder in its sidebar?

    you can create a ProjectSidebar.ss and include it in ProjectHolder.ss

    inside ProjectSidebar.ss add a control block.

    <% control Children %>
    <p>$Title</p>
    <p>$URLSegment</p>
    <% end_control %>

    hope that's what you trying to do.

    cheers

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Need help Link to this post

    No i have them already in sidebar but in holder page only how to show them in other pages too like frontpage and contacts and so on.

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Need help Link to this post

    how to make it
    is there avai to control childrens if i am on some other page what is made using diffrent pagetype

  • SSadmin
    Avatar
    Community Member
    90 Posts

    Re: Need help Link to this post

    you could try create a function retrive(){} and using DataObject::get('Project'.....) to retrieve the Prjoect type object in other pages.
    Put in to HomePage_Controller{}. and call it in .ss template using $retrive to get the whole object.
    The Debug::show(); could be helpful when u not sure what will output after calling DataObject::get().

    Hope it may help

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