Salve a tutti - Premessa di rito: sono completamente ignorante di php !!! detto questo veniamo al dunque:
Nella home del sito utilizzo una vista composta da una tabella di una sola colonna.
Per personalizzare il layout delle singole righe ho collegato il file views-view-fields--XX.tpl.php inserendo questo codice per mettere tutti i campi da "voti" a "distance" in un solo div con una classe specifica ("uniscicampischeda") in modo da assegnare loro lo stile desiderato:
""""
<?php
/**
* Default simple view template to all the fields as a row.
*
* - $view: The view in use.
* - $fields: an array of $field objects. Each one contains:
* - $field->content: The output of the field.
* - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
* - $field->class: The safe class id to use.
* - $field->handler: The Views field handler object controlling this field. Do not use
* var_export to dump this object, as it can't handle the recursion.
* - $field->inline: Whether or not the field should be inline.
* - $field->inline_html: either div or span based on the above flag.
* - $field->wrapper_prefix: A complete wrapper containing the inline_html to use.
* - $field->wrapper_suffix: The closing tag for the wrapper.
* - $field->separator: an optional separator that may appear before a field.
* - $field->label: The wrap label text to use.
* - $field->label_html: The full HTML of the label to use including
* configured element type.
* - $row: The raw result object from the query, with all data it fetched.
*
* @ingroup views_templates
*/
?>
<?php
foreach ($fields as $id => $field):
?>
<?php
if ($id == 'field_voti'):
?>
<?php
endif;
?>
<?php
if (!empty($field->separator)):
?>
<?php
print $field->separator;
?>
<?php
endif;
?>
<?php
print $field->wrapper_prefix;
?>
<?php
print $field->label_html;
?>
<?php
print $field->content;
?>
<?php
print $field->wrapper_suffix;
?>
<?php
if ($id == 'distance'):
?>
<?php
endif;
?>
<?php
endforeach;
?>
con firebug vedo questo codice per la visualizzazione della riga:
..
..
..
..
..
..
Quello che adesso vorrei è spostare il div class="uniscicampischeda" al di sopra dei div ".." e ".." , ma non so dove mettere le mani. Ho provato anche a cambiare l'ordine dei campi nelle impostazioni della vista, ma non succede niente!
Potete aiutarmi?
grazie mille!!!
questo è quello che vedo con firebug
td class="col-1 col-first vistacomplessiva"
div class="views-field views-field-title nomeattivita"../div
span class="views-field views-field-name"../span
span class="views-field views-field-last-updated"../span
div class="views-field views-field-field-foto"../div
div class="views-field views-field-body descrizione"../div
div class="uniscicampischeda">..