I been working on a custom views for almost 12 hours and im stuck, i have one TINY change remaining i need to make and i cant figure it out.
For my view, i have a custom template file for views-view.tpl.php. The name of the file is views-view--reports-block--block.tpl.php (my view is called 'Reports Block').
You can see the code in that file below:
* Default simple view template to display a list of rows.
* - $title : The title of this group of rows. May be empty.
* - $options['type'] will either be ul or ol.
* @ingroup views_templates
<?php print $wrapper_prefix; ?>
<?php if (!empty($title)) : ?>
<h3><?php print $title; ?></h3>
<?php endif; ?>
<div id="collapseOne" class="accordion-body collapse">
<?php print $list_type_prefix; ?>
<?php foreach ($rows as $id => $row): ?>
<li class="<?php print $classes_array[$id]; ?>"><?php print $row; ?></li>
<?php endforeach; ?>
<?php print $list_type_suffix; ?>
<?php print $wrapper_suffix; ?>
Now the only thing i want to do is to replace "collapseOne" with the Node ID. Thats it. I have managed to do this in another template file using the code below, but it doesnt seem to work for this template file:
<?php $accordinnid = $row->nid; ?>
Any help would be much appreciated. Thanks