How to add selectors?

Jboo - July 30, 2008 - 09:52

I'm trying to get the activeedit module working, and it kind of does for one selector that I've noticed. I have an inc file but i'm unsure how to edit it to add more selectors, for the node content and perhaps a couple of CCK fields I've added for example. Here's what's in the inc file...

<?php
function activeedit_theme_data() {
 
$selectors = array();
 
$selectors['logo_path'] = '#logo > a';
 
$selectors['site_name'] = '#logo-floater span';
 
// No usable selector for slogan.
  // $selectors['site_slogan'] = '#logo-floater a';
 
$selectors['site_mission'] = '#mission';
 
$selectors['site_footer'] = '#footer';
 
$selectors['node_title'] = 'h2 > a';
 
$selectors['comment_subject'] = 'h3 > a';
 
$selectors['node_content'] = '.content';
  return
$selectors;
}
?>

I kind of understand that the part after the equals sign is the css id , but don't know what I need to do within the brackets. The node content near the end of the example above is the one I've tried adding myself (guessed!), but it doesn't work, unsurprisingly!

Can anyone point me in the right direction?

Thanks for any help.

As a followup, I can kind of

Jboo - July 30, 2008 - 10:08

As a followup, I can kind of see how this works, but as another question...how can I insert placeholders into this so that the #url will work for all node edits and not just redirect to a specific one?

<?php
$elements
['node_content'] = array(
   
'#title' => t('body'),
   
'#selector' => '.content',
   
'#url' => 'node/6/edit',
   
'#access' => $access,
   
'#form' => array(
     
'system_site_information_settings' => array(
        array(
         
'node_content',
        ),
      ),
    ),
  );
?>

 
 

Drupal is a registered trademark of Dries Buytaert.