As a block on my homepage I'm trying to output:
<ul>
<li><a><img><p>Node 1</p></a></li>
<li><a>Node 2</a></li>
<li><a>Node 3</a></li>
<li><a>Node 4</a></li>
</ul>
where each <li> represents a node, and the image/text supplied by CCK fields attached to each node.
Currently, I'm using a block view to output nodes 2-4, and an Attachment view to present the first node as outlined here: http://www.agileapproach.com/blog-entry/the-views2-attachment-display
The problem is my output ends up more like this:
<div class="attachment attachment-before">
<div class="view view-homepage-news ..">
<div class="item-list">
<ul>
<li class="views-row ...">
<a><img><p>Node 1</p></a>
</li>
</ul>
</div>
</div> <!-- /.view -->
</div>
<div class="item-list">
<ul>
<li class="views-row ..."><a>Node 2</a></li>
<li class="views-row ..."><a>Node 3</a></li>
<li class="views-row ..."><a>Node 4</a></li>
</ul>
</div>
I can probably bend that output suit my purpose, but it will involve a lot of templating and configuration. I'd also like to avoid using CSS and/or JavaScript to modify the output, unless that's my only option.
Given this, what's the easiest way to get the output closer to what I need it to be?
Edit: here's some rough php code I'm using in the customfield php code field (based on Jeremy French's suggestion: Here's the code I'm using in my PHP Code customfield:
<?php
++$static;
if ($static == 1) {
$nd=node_load($data->nid);
$img_path = imagecache_create_path('news_image_thumbnail', $nd->field_image[0]['filepath']);
print '<a><img src="' . $img_path . '"><p>Node 1</p></a>';
} else {
print "<a>Node $static</a>";
}
?>