How to configure unknown fields and module settigns

bigmack83 - July 9, 2009 - 07:58
Project:Patterns
Version:6.x-1.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

When a new module is installed, or when settings for various features need to be set, how would one figure out how to refer to it in the xml file? So if i want to change a given setting in panels, or the admin_menu, or how to change a setting on any other given setting on the site. Can you sue the devel module and tell it to show the form elements and weights to show the names of different fields to get their values?

For example, if part of the pattern i have created I want to install and setup the IMCE module. How would i know how to call the different fields and dropdowns, and their values from the patterns XML file to set them as desired?

#1

ChrisBryant - July 11, 2009 - 07:52

The module supports a tag that let's you fill out pretty much any form. I'll paste some syntax below.

There is also a setting for "Enable Patterns Form Helper" under /admin/build/patterns/settings that will show the values from submitted forms. This will help to see what forms submit and what you can use with the tag.

Here are a few YAML examples: (XML should be similar)

  - tag: form
      form_id: system_error_reporting_settings
      site_403: 403-access-denied
      site_404: 404-page-not-found
  - tag: form
      form_id: adminrole_admin_settings
      adminrole_adminrole: @adminrole@
  - tag: form
      form_id: addanother_admin
      addanother_nodetypes:
        page: page
  - tag: form
      form_id: system_performance_settings
      cache: true
      page_compression: true
      block_cache: true
      preprocess_css: true
      preprocess_js: true
  - tag: form
      form_id: system_performance_settings
      clear: Clear cached data

We have plans to generate patterns automatically so that you don't have to do this manually, but we haven't had the time to write it just yet. Ideally each of the useful modules should have patterns support written and supplied with them so that the form tag isn't necessary. We've also started work on the Configuration Framework module which should make this much easier as well.

Hope that helps!

#2

ChrisBryant - July 11, 2009 - 08:12

I created a documentation page for this here:

http://drupal.org/node/516332

#3

bigmack83 - July 11, 2009 - 18:26
Status:active» fixed

Great! thanks, i did notice the 'enable patterns form helper' but wasnt sure how to make the best use of it. I think this is a great module and def. has some potential. I should be able to do what i want to try out. thanks.

#4

System Message - July 25, 2009 - 18:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.