Is it possible to customize the create content form? (?q=node/add). I'd simply like add a header in the tradition of a view's header. If this is not possible, is it possible to create a view that acts the same as the create content form? I.e. generates links for every content type available for creation.

Comments

vm’s picture

you can add a custom tpl.php to theme the edit form. node-edit.tpl.php I believe is the naming convention. Double check with devel or the documentation where it concerns themeing.

ballerjones’s picture

Though I know very little, I will attempt this. I understand the part about making a file called node-edit.tpl.php, but of what php is this file composed of? I cannot locate the "default" code for the create content form to which I would add a header. Am I missing something?

ballerjones’s picture

Ok, so I'm trying what is probably an unconventional approach. In this file: http://api.drupal.org/api/function/theme_node_add_list,

I have added a simple print function:

function theme_node_add_list($content) {
  $output = '';

  if ($content) {
    print("A bunch of junk to see here");
    $output = '<dl class="node-type-list">';
    foreach ($content as $item) {
      $output .= '<dt>'. l($item['title'], $item['href'], $item['localized_options']) .'</dt>';      
      $output .= '<dd>'. filter_xss_admin($item['description']) .'</dd>';
    }
    $output .= '</dl>';
  }
  return $output;
}

This works, but prints the text in the upper left of the screen. I'd like this to appear in the content area. I know I have to specify $content or something, but I have no idea really (little php knowledge). Any ideas?

ballerjones’s picture

how do I specify the location for the printed text? Or is there a better way?