Drupal 6

Fee Fid Fo Fum - Retrieving an Image with a FID in Drupal 6

I had the need to add an image tag to page output that was generated inside a custom Drupal module. I had retrieved the image's FID (file ID) from the CCK field, and needed to get from there to having an ImageCache version of the image displayed. I'd done it within a view by selecting the appropriate field format in the Views UI, but how to do it in code? Like many other tasks in Drupal, the solution turned out to be easier than the hunt for it.

Where is my Drupal View pager??

I created a view the other day, a simple view with one display, and change the Pager setting to Full. I had the view set for 50 records per page, and there were hundreds of records. When the first page loaded, there was no pager present.

And so began the head scratching.

I created a high level template (views-view--mypage.tpl.php) and dumped the $pager variable, preceded by *****. All I had on my output was *****. It would've been nice if I had a CSS display:none for the pager, but that's not the case.

So, what's the answer?

Subscribe to Drupal 6