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.

Customising the CMS /

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

print permission on a TableList Field


Go to End


1949 Views

Avatar
iculshaw

Community Member, 13 Posts

23 December 2008 at 11:13am

Hi,

I'm trying to get the print function working on my TableListField however I don't really understand how it works as it uses ViewableData which i haven't encountered before.

The printable template then includes the TableListField template to display the data but I can't see where it passes any of the actual data to the template the section of code i'm looking at is below.

	function printall() {
		Requirements::clear();
		Requirements::css('cms/css/typography.css');
		Requirements::css('cms/css/cms_right.css');
		Requirements::css('sapphire/css/TableListField_print.css');
		$vd = new ViewableData();
		return $vd->customise(array(
			'Content' => $this->customise(array(
				'Print' => true
			))->renderWith($this->template)
		))->renderWith('TableListField_printable');
		
	}