We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Hi,

    I struggling to find a way to force that a child be created with a specific template.

    What would be the correct action to target document creation. I have attached what I think should work.

    Also, is there a way to target the ultimate parent instead of the direct parent in the constraint section.

    Thanks
      • 28215
      • 4,149 Posts
      Quote from: cipa at May 26, 2010, 04:08 PM

      I struggling to find a way to force that a child be created with a specific template.
      What would be the correct action to target document creation. I have attached what I think should work.
      Use a Name of ’template’, containing panel ’modx-panel-resource’, the Rule ’Field Default Value’, and value of the ID of the template.

      That said, this seems to be buggy with pre-setting Templates. The combo seems to be overriding it. I’ll have to look into it. Could you file a bug?


      Also, is there a way to target the ultimate parent instead of the direct parent in the constraint section.
      Not at this time, no.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 5340
        • 1,624 Posts
        Created

        http://svn.modxcms.com/jira/browse/MODX-2000
        and
        http://svn.modxcms.com/jira/browse/MODX-2001


        Until these are fixed, are there any other ways I can influence the default template of a new document?
        Will a plugin similar to Template Rules(see signature) work?

        Thank yiu
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: cipa at May 26, 2010, 07:30 PM

          Until these are fixed, are there any other ways I can influence the default template of a new document?
          Will a plugin similar to Template Rules(see signature) work?
          Doesn’t look like it; at the current time it is coded to use either the parent’s template, if the parent exists, or the default_template setting.