null

composer update silverstripe/admin 1.4.2 as 1.3.3, where "1.4.2" is some specific tagged 1.4.x release

👍 (1)
null

Yes, I was guessing 1.x based on previous descriptions

null

If you're making a logout link/button/whatever, pop this in your template: <a href="/Security/logout?SecurityID=$SecurityID">

null

^^ That one appears in like every pentest I get to review 😄

null

Try adding your $summary_field value to $searchable_fields as well

null

Move your layout_template into customise and put your page_template into renderWith

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

This question actually seems to come up a lot... 😂

null

Yep, it's an inconsistent API between SS3 and SS4 that trips people up a lot. You recognise it quickly after you've done a few upgrades!

✔️ (1)
jkersu

I think I'm just going to star this so its easy to find for next time 🙂

null

Slack's going to eat it in about a week or two because of the message limit, best to find it in the Slack Archive and bookmark it 😄

taoceanz

Cheers @null you made my day. I've done something similar to your suggestion. I didn't know about the execute_template method. Cheers for that!

  1. return $this
  2. ->renderWith(
  3. 'Page',
  4. ArrayData::create(
  5. [
  6. 'Layout' => SSViewer::execute_template(
  7. 'ACME\Model\Layout\SomeLayout',
  8. ArrayData::create($templateData)
  9. )
  10. ]
  11. )
  12. );
null

There's also SSViewer::execute_string() if you like to live dangerously

adrexia

^ maybe post the answer to the forum ?

👏 (1)

Show less replies