Skip to main content
fixed a sentence missing the punctuation
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Firstly welcome to the Drupal community!!! There isn't really a l single resource to use when contemplating Drupal best practices however searching both drupal.org and api.drupal.org should point you in the correct direction.

It is considered best practice to keep your tpltemplate files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road :). Try hook_preprocess_pagehook_preprocess_page() to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_termtemplate_preprocess_taxonomy_term(); if that fails you could preprocess the field you are using to display your term via template_preprocess_field.

https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/template_preprocess_taxonomy_term/7.x

https://api.drupal.org/api/drupal/modules!field!field.module/function/template_preprocess_field/7.xtemplate_preprocess_field()

Cheers!.


 

Edit: If you just want to render the term as text you can visit the manage display tab when managing your content type and change the display formatted from link to plain text.

Firstly welcome to the Drupal community!!! There isn't really a l single resource to use when contemplating Drupal best practices however searching both drupal.org and api.drupal.org should point you in the correct direction.

It is considered best practice to keep your tpl files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road :). Try hook_preprocess_page to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_term if that fails you could preprocess the field you are using to display your term via template_preprocess_field.

https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/template_preprocess_taxonomy_term/7.x

https://api.drupal.org/api/drupal/modules!field!field.module/function/template_preprocess_field/7.x

Cheers!


 

Edit: If you just want to render the term as text you can visit the manage display tab when managing your content type and change the display formatted from link to plain text.

It is considered best practice to keep your template files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road. Try hook_preprocess_page() to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_term(); if that fails you could preprocess the field you are using to display your term via template_preprocess_field().

If you just want to render the term as text you can visit the manage display tab when managing your content type and change the display formatted from link to plain text.

Added additional info
Source Link

Firstly welcome to the Drupal community!!! There isn't really a l single resource to use when contemplating Drupal best practices however searching both drupal.org and api.drupal.org should point you in the correct direction.

It is considered best practice to keep your tpl files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road :). Try hook_preprocess_page to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_term if that fails you could preprocess the field you are using to display your term via template_preprocess_field.

https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/template_preprocess_taxonomy_term/7.x

https://api.drupal.org/api/drupal/modules!field!field.module/function/template_preprocess_field/7.x

Cheers!


Edit: If you just want to render the term as text you can visit the manage display tab when managing your content type and change the display formatted from link to plain text.

Firstly welcome to the Drupal community!!! There isn't really a l single resource to use when contemplating Drupal best practices however searching both drupal.org and api.drupal.org should point you in the correct direction.

It is considered best practice to keep your tpl files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road :). Try hook_preprocess_page to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_term if that fails you could preprocess the field you are using to display your term via template_preprocess_field.

https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/template_preprocess_taxonomy_term/7.x

https://api.drupal.org/api/drupal/modules!field!field.module/function/template_preprocess_field/7.x

Cheers!

Firstly welcome to the Drupal community!!! There isn't really a l single resource to use when contemplating Drupal best practices however searching both drupal.org and api.drupal.org should point you in the correct direction.

It is considered best practice to keep your tpl files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road :). Try hook_preprocess_page to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_term if that fails you could preprocess the field you are using to display your term via template_preprocess_field.

https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/template_preprocess_taxonomy_term/7.x

https://api.drupal.org/api/drupal/modules!field!field.module/function/template_preprocess_field/7.x

Cheers!


Edit: If you just want to render the term as text you can visit the manage display tab when managing your content type and change the display formatted from link to plain text.

Source Link

Firstly welcome to the Drupal community!!! There isn't really a l single resource to use when contemplating Drupal best practices however searching both drupal.org and api.drupal.org should point you in the correct direction.

It is considered best practice to keep your tpl files organized and simple by placing all complicated PHP logic inside of preprocess functions. This will make you happy when you revisit your code down the road :). Try hook_preprocess_page to pass your EntityFieldQuery results as a new variable to your page--front.tpl.php.

Try to preprocess the term via template_preprocess_taxonomy_term if that fails you could preprocess the field you are using to display your term via template_preprocess_field.

https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/template_preprocess_taxonomy_term/7.x

https://api.drupal.org/api/drupal/modules!field!field.module/function/template_preprocess_field/7.x

Cheers!