Hey Guys,
I'm having a little trouble with this one. I'm theming a view at the fields level(views--fields-foo.tpl.php). I have it setup something like this(the anchor is styled as a block, and everything inside links)
<a class="anchorBlock" href="LINKTONODE">
<div class="randomfield"><?php print $fields['foo']->content; ?></div>
<div class="randomfield"><?php print $fields['foo']->content; ?></div>
<div class="randomfield"><?php print $fields['foo']->content; ?></div>
</a>
The problem is that I can't figure out how to write the anchor. I was hoping to pull the url from the "view_node" field that is packaged with views, but I can't figure out how to override it so I only get the anchor from it, meaning:
When I use the code
<div class="randomfield"><?php print $fields['view_node']->content; ?></div>
It renders something like this
<a href="http://www.site.com/node/123">Link</a>
and all I want is
http://www.site.com/node/123
Has anyone done this before and have some advice? I'm really stumped. I've thought about just making field in the content type where I manually add the url and print that in the view, but that is so sloppy and rather embarrassing. Thanks a million.
Edit: