Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Big issue for me, - renderWith


Go to End


11 Posts   4764 Views

Avatar
kinglozzer

Community Member, 187 Posts

14 December 2013 at 4:23am

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.

Avatar
George Botley

Community Member, 18 Posts

14 December 2013 at 4:27am

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.

Avatar
George Botley

Community Member, 18 Posts

14 December 2013 at 4:36am

Scrap that/ Working now. Thanks. :)

Go to Top