For handbook: Theming flexinode at all levels: possible solutions

magnestyuk - July 5, 2005 - 19:49
Project:Flexinode
Version:4.6.x-1.x-dev
Component:Documentation
Category:task
Priority:normal
Assigned:Bèr Kessels
Status:active
Description

this is for phptemplate!

-----------------------------------------

to theme flexinode at the node level:

--use this patch first (although i'm not entirely sure if it is needed....)

--create in you theme directory node-flexinode-x.tpl.php files where x is the id of the flexinode type. copy the contents of node.tpl.php, insert into your new file(s) and modify to you liking.

------------------------------------------

to theme the different types of fields: (=> all fields of the same type will look the same)

--use this tutorial

--note that this involves creating in your theme directory flexinode_fieldtype.tpl.php fles, where fieldtype is e.g. textfield

------------------------------------------

to theme all the fields separately, by field id:

--after you created your flexinode_fieldtype.tpl.php file, create if statements for each field you want to theme separately

e.g. my flexinode_textfield.tpl.php looks something like this

<div class="flexinode-textfield-<?php print $field_id; ?>">
<span class="form-item">
<?php if ($field_id == 29): ?>(<?php print $formatted_value; ?>)
<?php elseif ($field_id == 51): ?><label><?php print $label; ?>:</label><?php print $formatted_value; ?>
...etc.
<?php endif; ?>
</span>
</div>

#1

Dextro - August 17, 2005 - 09:43

The patch to theme flexinode at the node level is not needed as mentioned.

#2

Bèr Kessels - January 2, 2007 - 10:03
Title:Theming flexinode at all levels: possible solutions» For handbook: Theming flexinode at all levels: possible solutions
Category:support request» task
Assigned to:Anonymous» Bèr Kessels

Marknig this as a task. Above text should be put in the handbook

 
 

Drupal is a registered trademark of Dries Buytaert.