Posted by tocamelo on September 7, 2011 at 2:57am
Hello,
I am trying to create a custom image gallery with identical functionality to this http://hectormercado.com/demo/.
I created a content type 'image' that has one cck field called type of work. I created a view that out puts the images as list, and everything outputs fine and dandy.
What I am trying to get is the CCK field and the thumbnail image to show up as LI attributes:
<li data-tags="Content from CCK Field" style="background-image:url('URL FROM CONTENT TYPE'); width:160px; height:120px"> <a class="overlayLink" href="images/large/all_bull_large.jpg" title="test" ></a> </li>
I am able to get the CCK field in a node--image.tpl.php but as soon as I copy that code over to views-view-list--image-gallery-1.tpl the page doesn't render the output for that field.
Any help, suggestions feedback, compliments, insults would be appreciated.
thank in advance.
Comments
Node templates and views
Node templates and views templates have different variables passed into them, so the code from one cannot be pasted into the other. I would use devel and the dpm() function to take a closer look at the variables you're getting in the view template and make sure you are referencing things properly.