drupal-theming

How to quickly theme a view?

霸气de小男生 提交于 2019-11-27 10:15:52
I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the " field " way and the " node " way. In "edit View", you can choose " Row style: Node ", or " Row style: Fields ". with the " Node " way, you can create a node-contentname.tpl.php which will be called for each node in the view. You'll have access to your cck field values with $field_name[0]['value']. (edit2) You can

How do I use theme preprocessor functions for my own templates?

亡梦爱人 提交于 2019-11-27 04:16:18
问题 I have several .tpl.php files for nodes, CCK fields, and Views theming. These template files have a lot of logic in them to move things around, strip links, create new links, etc. I understand that this is bad development and not "The Drupal Way". If I understand correctly, "The Drupal Way" is to use preprocessor functions in your template.php file to manipulate variables and add new variables. A few questions about that: Is there a naming convention for creating a preprocessor function for a

How to quickly theme a view?

孤者浪人 提交于 2019-11-27 04:01:48
问题 I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Is there any tutorial or information on this? What are the files I need to modify? Here are my findings: (Edited) In fact, there are two ways to theme a view: the " field " way and the " node " way. In "edit View", you can choose " Row style: Node ", or " Row style: Fields ". with the " Node " way, you can create a node-contentname.tpl.php which will be called for each node in