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

Display Page(Layout) with subpage content


Go to End


1220 Views

Avatar
Skullies

Community Member, 19 Posts

19 August 2016 at 1:04am

Edited: 19/08/2016 1:04am

Good day
I am trying to use the Page.ss parent to use as my layout and have a subpage ie. PayablePage for my content.
The problem is I have DataObjects in my PayablePage that I want to be able to display that I get from my "HomePage".

I am able to display the content if I use

public function update(){
		$ssv =new SSViewer("PayablePage");
		$ssv->setTemplateFile( "Theme","PayablePage");
		return $this->renderWith($ssv);
		}

but with the SSViewer I want to use the normal Page type.
If anyone has a idea that i could try that would be great.

Regards
Skullie