ShaneW

When using renderWith is there a way to define the page to use (eg http://Page.ss) and the template to use for the Layout (eg http://MySpecialLayout.ss)?

jkersu

Not entirely sure but maybe something like this?

  1. $this->customise(['Layout' => SSViewer::execute_template(layout_template)]
  2. ->renderWith('page_template', ArrayData::create([...])
ShaneW

Yeah I thought that might be the case. So there is no way to do this in SS4 anymore?

theruss

I had to do resort to this the other day:

  1. return $this->renderWith('Page', ArrayData::create([
  2. 'Layout' => $this->customise($data)
  3. ->customise(['All' => strtolower($request->param('OtherID')) == 'all'])
  4. ->renderWith(['Path/To/Layout/SomeTemplate', 'Page'])
  5. ]));
ShaneW

@MichalKleiner awesome, thanks a lot! I added both extensions to config in the app folder in the desired order and it now works as I want to

ShaneW

Is there any way to dictate with extension should have priority?

ShaneW

If I have two modules installed and both have a dataextension on page with the same function

ShaneW

Great thanks, not as easy as I was hoping

ShaneW

What is the easiest/best way to add the history tab for versioned dataobjects?

ShaneW

yeah, I should have read the documentation:

ShaneW
  1. ->setOption('content_css', 'myfile.css');
ShaneW

For tiny MCE is there any way to do this in SS4: