Need CCK Views assistance

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
tocamelo's picture

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

jstoller's picture

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.

LA Drupal [Los Angeles Drupal]

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: