Skip to main content
added 5 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Take a look at the default node.tpl.php. You'll notice that they render the content with render($content);.

I've never used contemplateContemplate, but if you install the devel module you can then use the dpmdpm() function to take a look at the variables in detail. Try dpm($content);, and you see all the content that you can render, or even use the hide function to remove content.

  For example, you can use hide($conent['links]$content['links]); prior to render($content);. This will not render and the links element when you render content. In this casewill not be rendered; you case can display comments with render($conent['comments']$content['comments']);. Don't forget to print your render callsthe value returned by render(), as all render does is returnrender() returns the renderedHTML markup. You still need used to print itrender the element passed as argument to the function.

You can easily render the image field with render($conent['your_image_field']$content['your_image_field']);. If
If you are using the counties moduleCountries module, then you can control what you wantit is displayed in the content types display aton admin/structure/types/manage/your-content-type/display, and simply render it like you do with the rest of your content.

Take a look at the default node.tpl.php. You'll notice that they render the content with render($content);

I've never used contemplate but if you install the devel module you can then use the dpm function to take a look at variables in detail. Try dpm($content); and you see all the content that you can render or even use the hide function to remove content.

  For example you can use hide($conent['links]); prior to render($content);. This will not render the links element when you render content. In this case you case can display comments with render($conent['comments']);. Don't forget to print your render calls as all render does is return the rendered markup. You still need to print it.

You can easily render the image field with render($conent['your_image_field']);. If you are using the counties module then you can control what you want displayed in the content types display at admin/structure/types/manage/your-content-type/display and simply render it like you do the rest of your content.

Take a look at the default node.tpl.php. You'll notice that they render the content with render($content).

I've never used Contemplate, but if you install the devel module you can then use the dpm() function to take a look at the variables in detail. Try dpm($content), and you see all the content that you can render, or even use the hide function to remove content. For example, you can use hide($content['links]) prior to render($content) and the links will not be rendered; you can display comments with render($content['comments']);. Don't forget to print the value returned by render(), as render() returns the HTML markup used to render the element passed as argument to the function.

You can easily render the image field with render($content['your_image_field']).
If you are using the Countries module, then you can control what it is displayed in the content types display on admin/structure/types/manage/your-content-type/display, and simply render it like you do with the rest of your content.

Source Link
Jepedo
  • 1.5k
  • 13
  • 19

Take a look at the default node.tpl.php. You'll notice that they render the content with render($content);

I've never used contemplate but if you install the devel module you can then use the dpm function to take a look at variables in detail. Try dpm($content); and you see all the content that you can render or even use the hide function to remove content.

For example you can use hide($conent['links]); prior to render($content);. This will not render the links element when you render content. In this case you case can display comments with render($conent['comments']);. Don't forget to print your render calls as all render does is return the rendered markup. You still need to print it.

You can easily render the image field with render($conent['your_image_field']);. If you are using the counties module then you can control what you want displayed in the content types display at admin/structure/types/manage/your-content-type/display and simply render it like you do the rest of your content.