CptPillow

well its something inside a function now instead of a relation

John Lombardo

Yikes! Not sure if this is better or worse: the method 'forTemplate' does not exist on 'SilverStripe\ORM\ManyManyList'

CptPillow

try linking it to Page instead of SiteTree maybe?

John Lombardo

Where is it looking for the many_many? I have namespace WAIRC; in my FAQ.php

John Lombardo

That results in Uncaught LogicException: belongs_many_many relation Page.FAQs points to WAIRC\FAQ without matching many_many

John Lombardo

Un my Page.php I want to find any FAQ instances that link to the Page, so I tried using this:

  1. private static $belongs_many_many = [
  2. 'FAQs' => FAQ::class,
  3. ];
John Lombardo

Hi all, I am having a problem with a $many_many and $belongs_many_many relationship. I have a FAQ DataObject that uses a TreeMultiselectField to create an array of pages that FAQ instance is linked to. It works great and includes…

  1. private static $many_many = array(
  2. 'LinkedPages' => SiteTree::class
  3. );
taoceanz

How does one use custom templates with UserForms? I have custom templates in app/templates/SilverStripe/Forms working, and a couple templates in app/templates/SilverStripe/UserForms/FormField, but for some form fields, UserForms is using templates from SilverStripe/Forms. With showtemplate=1 on it shows the CheckboxField is using the http://SilverStripe.Forms.OptionsetField.ss template, except that's the template from silverstripe/framework/templates/SilverStripe/Forms rathar than app/templates/SilverStripe/Forms.