mike_henden

hmm, thanks @thats4shaw — on the right track but still getting errors… I’m obviously getting other things wrong!

mike_henden

Got it thanks @firesphere — so I’ve renamed back to ProductHolder as that is the page type that it’s copying… and now it’s telling me:

Fatal error: Class 'App\MyProject\VirtualPage' not found in /Users/mikehenden/Sites/Connectors/app/src/VirtualProductHolderPage.php on line 7

So I shouldn’t be using VirtualPage in Line 7?

mike_henden

@firesphere — are you suggesting I ‘extend’ VirtualPage class like so?

(I’ve called it ’VirtualHolderPage as it could be used for two ‘Holder’ types of page)

mike_henden

Thanks @firesphere and @MichalKleiner — so I do a new page type (ie VirtualProductPage)?!

mike_henden

Good morning people. Curious one I’ve just found — I have a client that has Product pages displayed on a ProductHolder page type. He wants to display the ProductHolder page as a virtual page on different parts of the site (this is to do with only entering Product information once). However the ProductHolder virtual page only displays the page headings, not the Product page information that should also be showing (i.e. it is not a complete copy). Can anybody tell me what’s going on?

mike_henden

Hey guys, something I’ve always wondered about: How come the <title> tag of my pages always displays the page heading and I can’t seem to override this if I want a shorter title to appear? I thought using a custom meta tag to specify what I want, but I’ve never been able to get Silverstripe to accept (or even notice) this in any version (2 — 4). Is it (probably) just me or have others had this problem? 🤔

mike_henden

Template is the easy part I think:

  1. <% loop $NestedItems %>
  2. {$Image}
  3. {$Content}
  4. <% end_loop %>

Just not sure of the PHP part… setting up the backend controls?

mike_henden

Hi @guttmann — haven’t given it a name yet — it’s going to be a grid of step-by-step instructions (and related photos) on a page. Because the client is going to be setting the and editing all content I don’t know dimensions for this page type or how many objects there will be?

mike_henden

Hey @MichalKleiner — I’m feeling thick but — can you please clarify the following:

  1. 'NestedItems' => YourSpecialDetailDO::class,

Just can’t think of what class I would be using?

nightjarnz

You described HolderPage/ChildPage. You aren't making ChildPage, but you still need ChildDataObject. This is the class type of NestedItems in the example.