Jump to:

3434 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Big issue for me, - renderWith

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

Page: 1 2
Go to End
Author Topic: 838 Views
  • kinglozzer
    Avatar
    Community Member
    138 Posts

    Re: Big issue for me, - renderWith Link to this post

    Pretty-much, yeah. You could avoid putting your Book in it's own scope, by instead returning:

    $this->customise($book)->renderWith(...

    However, this will mean that any matching variable names will be overridden. For example, if your book has a 'Title' field, using this method would override the 'Title' for the page. Sometimes this is desirable (news items, for example), sometimes not.

  • George Botley
    Avatar
    Community Member
    16 Posts

    Re: Big issue for me, - renderWith Link to this post

    I just made your change, the menu now appears, but now none of my data objects within this page type now appear..

    Any tips?

    I.e...

    A main titles page (that now shows all fine)
    -- A book data object within CMS not showing
    --- A reviews data object within the book data object also not showing.

  • George Botley
    Avatar
    Community Member
    16 Posts

    Re: Big issue for me, - renderWith Link to this post

    Scrap that/ Working now. Thanks.

    838 Views
Page: 1 2
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.