0

I have a requirement to build a content type that has a number of fields and also the body section which is where the html goes. When new content is added using this new content type the user would enter information for all the fields (like city, state, zip, etc) and at the point of saving the content that is created is a combination of what was already inside the body section plus the fields values would go in their assigned areas within the body section. What possible ways could this be implemented? Any recommendations for modules that do the above?

1
  • Are you saying that the user would be inputting some sort of tokens into the body that would then be replaced with the text of the other fields? or, are you asking how to adjust the order in which fields are displayed before and/or after the body? if the latter, another approach might be to have no body at all and instead a text area field. then you could just order it amongst all the other fields any way you wanted.
    – Jimajamma
    May 3, 2013 at 18:53

1 Answer 1

0

I think it sounds like you want to write a node template. http://api.drupal.org/api/drupal/modules%21node%21node.tpl.php/7

Basically you are going to create a template file called node--content-type-name.tpl.php and in that template you have access to the $node object which contains fields. Then write your html and use the values from $node.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.