null

@Gian I think you can pass hide_ancestor in to VirtualPage via config.yml:

  1. SilverStripe\CMS\Model\VirtualPage:
  2. hide_ancestor: SilverStripe\CMS\Model\VirtualPage
👍 (1)
Saravana Shankar

Hi guys, I have code return $this->customise($data)->renderWith(array('/Layout/Delivery', 'Page')); Which imports the page template while using this in SS 4 is not working

andante

your slashes are around the wrong way, which may be the problem

andante

otherwise i dont think you need layout, and make sure your template is in the right place

Saravana Shankar

@andante The Delivery template loaded correctly but the Page is not loaded.

andante

if the template loaded, then it is working - thats what it does

Saravana Shankar

In the previous version of SS it will imports the code from Page template also

andante

not sure then mate, don’t think thats how it should be working - put it back out to the channel

mmativ

I experience this before, your custom template will render but the http://page.ss code like your css and js will not be imported right?

mmativ

try to use PageType_MethodName, like Homepage_Thanks and you have Thanks methods


Show less replies
robbieaverill

there's a sort of hack you can do by extending each page type with a test only class and hiding its ancestor e.g. class HiddenVirtualPage extends VirtualPage implements TestOnly { private static $hide_ancestor = VirtualPage::class; } (i think)

Gian

Hello guys is there a way to remove this page types when adding new page?

Files: Requires logging in to the Slack workspace to view/download
Pasted image at 2019-02-21, 1:09 PM (PNG)
thats4shaw

https://www.silverstripe.org/learn/lessons/v4/adding-custom-fields-to-a-page-1 - will steer you in the right direction.

Show 1 attachment(s)
silverstripe.org  
SilverStripe Lessons » Adding custom fields to a page

In the previous lesson, we developed a structure for our Travel Guides section that provides a list view of articles, each with a link to their own detail page. Most of these templates are still hardcoded with static content, however, and need to be integrated with the CMS. In this lesson, we’ll start looking at how to add some custom fields to these pages to make them really come to life.

Hide attachment content
👍 (1)
mmativ

Hi, E.g. i have email tab on CMS and i want to push new fields under that tab, how can i do that? i see some codes before to that or maybe im wrong