You are here

README.txt in Field Formatter Template 7

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 8 README.txt
Field Formatter Template

Description
--------------------------
Field Formatter Template (FFT) allow you can easy create and select template for
any field formmater.

Installation
--------------------------
1. Copy the entire fft directory the Drupal sites/all/modules
directory or use Drush with drush dl fft.
2. Login as an administrator. Enable the module on the Modules page.

Usage
--------------------------
- Create your template, default formmater template store in folder
'sites/all/formatter', you can change this folder at 'admin/config/content/fft'.
Formatter template create as normal tpl template, example you create slideshow
template, create file with name 'slideshow.tpl.php' in folder
'sites/all/formatter' open file and type:
<code>
<?php
/*Template Name: Slideshow Template*/
print_r($data);
?>
</code>
Now open "Manage Display" of a content type, chose any field and chose
"Formatter Template" you can config and select "Slideshow Template". Your field
formmatter will display with 'slideshow.tpl.php'. Variables you can use in
template is $data and $entity
- $data: stored all data of selected field.
- $entity: attached entity of field.

File

README.txt
View source
  1. Field Formatter Template
  2. Description
  3. --------------------------
  4. Field Formatter Template (FFT) allow you can easy create and select template for
  5. any field formmater.
  6. Installation
  7. --------------------------
  8. 1. Copy the entire fft directory the Drupal sites/all/modules
  9. directory or use Drush with drush dl fft.
  10. 2. Login as an administrator. Enable the module on the Modules page.
  11. Usage
  12. --------------------------
  13. - Create your template, default formmater template store in folder
  14. 'sites/all/formatter', you can change this folder at 'admin/config/content/fft'.
  15. Formatter template create as normal tpl template, example you create slideshow
  16. template, create file with name 'slideshow.tpl.php' in folder
  17. 'sites/all/formatter' open file and type:
  18. /*Template Name: Slideshow Template*/
  19. print_r($data);
  20. ?>
  21. Now open "Manage Display" of a content type, chose any field and chose
  22. "Formatter Template" you can config and select "Slideshow Template". Your field
  23. formmatter will display with 'slideshow.tpl.php'. Variables you can use in
  24. template is $data and $entity
  25. - $data: stored all data of selected field.
  26. - $entity: attached entity of field.