Dan Hakimzadeh
Agenda ● A Fistful of Photos ● For a Few Photos More ● The Good, The Bad, and The Templates
CCK IMAGEFIELD DATE - IMAGECACHE - LIGHTBOX - NAT - VIEWS2 - The Modules
Setting Up 1 – make content types – EVENT (title, date) – IMAGE (title, imagefield) 2 – make vocabulary for tagging IMAGE content type (galleries) 3 – link NAT and events, so each new event creates a matching term under our galleries vocabulary 4 – make some imagecache presets
Building the view, finally...
Style == HTML List Items to display == 8 Sort == Random Filter by published IMAGE content type THE FIELD FORMAT!!!
But is that really how we want to do this? Only 8 photos?! What if we make the photos link to their gallery pages and run lightbox from there?
Make gallery pages
Problem This will output Like - OK Pub & Grill - BAD
We want to do it with Term ID not Term Name coz that's how the cool kids do it
Time for some ninja skillz
● Go to theme folder ● Make a file named: “views-view-field—PhotoBar--block-1--name.tpl.php” ● Paste that stuff into it (the template) “ views-view-field.tpl.php” ● Modify to the limits of your imagination
5:34 PM me: using <?php $data = $row->$term_data_tid; print $data; ?> in my tpl BUT 5:35 PM i3iviivi: what is on line 26, and did you update? 5:37 PM me: line 26 is $data = $row->$term_data_tid; 5:38 PM i3iviivi: oh god damn you NO DOLLAR SIGN NO VARIABLES INSIDE VARIABLES
Run through most of the same steps, blah blah, create a file named: “views-view-field—PhotoBar--block-1--field-image-fid.tpl.php” Paste that stuff into it Modify and make it awesome, in this case we make the thumbnail a link to it's gallery page
Other uses
conclusion You could be like D.A.R.Y.L
Dan Hakimzadeh