Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dan Hakimzadeh Agenda ● A Fistful of Photos ● For a Few Photos More ● The Good, The Bad, and The Templates.

Similar presentations


Presentation on theme: "Dan Hakimzadeh Agenda ● A Fistful of Photos ● For a Few Photos More ● The Good, The Bad, and The Templates."— Presentation transcript:

1 Dan Hakimzadeh http://agaric.com @dhakimzadeh

2 Agenda ● A Fistful of Photos ● For a Few Photos More ● The Good, The Bad, and The Templates

3

4 CCK - http://drupal.org/project/cck -- IMAGEFIELD - http://drupal.org/project/imagefield -- DATE - http://drupal.org/project/date IMAGECACHE - http://drupal.org/project/imagecache LIGHTBOX - http://drupal.org/project/lightbox2 NAT - http://drupal.org/project/nat VIEWS2 - http://drupal.org/project/views The Modules

5 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

6 Building the view, finally...

7 Style == HTML List Items to display == 8 Sort == Random Filter by published IMAGE content type THE FIELD FORMAT!!!

8

9 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?

10 Make gallery pages

11

12

13

14

15

16 Problem This will output http://alpharoad.com/photos/TERMNAME Like http://alpharoad.com/photos/generalhttp://alpharoad.com/photos/general - OK http://alpharoad.com/photos/KC's Pub & Grill - BAD

17 We want to do it with Term ID not Term Name coz that's how the cool kids do it

18 Time for some ninja skillz

19

20

21 ● 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

22

23

24

25 5:34 PM me: using <?php $data = $row->$term_data_tid; print $data; ?> in my tpl BUT http://alpharoad.agariclabs.com:81/ 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

26

27

28 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

29

30

31 Other uses

32

33 conclusion You could be like D.A.R.Y.L

34 Dan Hakimzadeh http://agaric.com @dhakimzadeh


Download ppt "Dan Hakimzadeh Agenda ● A Fistful of Photos ● For a Few Photos More ● The Good, The Bad, and The Templates."

Similar presentations


Ads by Google