I'm using spaces_taxonomy, and am trying to figure out the best way for my feature to allow for variable overrides on a per-space basis. I think I may simply be lost in the documentation. Here's what I've done:

  • I've created a feature and have enabled it for all space types (ie: spaces[types] = "all").
  • In my feature I've defined a menu callback for "features/[my-feature]", which implements "system_settings_form()" and exposes the variables I want to change on a per-space basis.
  • I visit "/features" on my site and see my feature (which I enable) and the link I created to "features/[my-feature]".
  • I visit "features/[my-feature]" and see the variables form items I've created. Submitting this form saves the items to Drupal's "variables" tables.

    Okay, great. Now I want to override these variables on a per-space basis. I'm guessing that going "/my_space_purl_prefix/features/[my-feature]" should present me with the same-looking form, but the submission should save the variables to "spaces_overrides" rather than "variables". However, when I go to "/my_space_purl_prefix/features/[my-feature]", I simply get redirected to "/features/[my-feature]".

    I'm sure I'm just mis-undersanding what the purpose of the "/features/[my-feature]" page is, but I can't seem to figure it out! Can someone please help me understand this?

    Cheers

  • Comments

    ryan_courtnage’s picture

    Status: Active » Closed (works as designed)

    Eureka! After carefully watching the address bar in Young Hahn's screencast (http://developmentseed.org/blog/2009/dec/18/spaces-3-customize-everythin...), I was able to determine where I went wrong.

    I was trying to set space-specific variable overrides by visiting "/my_space_purl_prefix/features/[my-feature]" (where "my_space_purl_prefix" is the Spaces path setting set in the Vocabulary term admin). I was simply in the wrong place.

  • Instead, I navigate to one of the terms in my Spaces vocabulary. ie: /taxonomy/term/1
  • Spaces then automatically redirects me to /my_space_purl_prefix/taxonomy/term/1
  • I see a list of nodes that have been created with this term/space, and a MENU_LOCAL_TASK entitled "Features"
  • Click Features, and I'm presented with the same-looking form found at "features/[my-feature]", except now upon submission the variables are stored to the spaces_overrides table. YES!