Hey there,

I can't find any solutions concerning my problem so i decided to give it a try here in the forum.

I have done a gallery content type latetly with the use of cck + cck imagefield + cck imagefield gallery + imagecache.
Because i want to list some gallerys in a view as teaser view, i don't want every picture to be displayed in the teaser just 5 or so. I tryed to use ConTemplate but then the images arent effected by imagecache and imagefield gallery and i lose those cute thumbnail images and just get the complete image. I tryed to get it working right for the last 3 days and can't find any solution, maybe because i'm a drupa beginner :/.

Hope theres someone out there who can help me if you need further informations i'll do my best to write them down here as fast as possible!!

Thanks in advance.

Comments

croX-1’s picture

anyone? :/

gpk’s picture

Have a look here in the first big block of code near the top of the page http://drupal.org/node/42597 for the definition of function theme_views_view_teasers(), which then invokes theme_views_view_nodes().

As you can see, the latter invokes node_view() which is the standard way that Drupal displays a node either as a teaser or in full http://api.drupal.org/api/function/node_view/5. However this is where it starts to get more complicated as I've not had to do much CCK themeing yet. There is documentation on themeing CCK fields but it looks a bit incomplete http://drupal.org/node/92382.

If you do a general internet search on themeing CCK you will find lots of useful stuff. One approach seems to be to create a node-customnodetype.tpl.php and to output the node content by hand, e.g. see http://agaricdesign.com/theming-cck-the-agaric-way http://agaricdesign.com/theming-cck-the-agaric-way but it might be preferable to just theme the individual "gallery" field ... have a look at http://artmess.org/content/theming-cck-presentation-and-materials also http://jaspan.com/cck-imagefield-imagecache-contemplate-snafu. Also look at the CCK imagefield gallery module since basically you need to override whatever this is doing to output the images (i.e. limit it to just 5).

HTH

gpk
----
www.alexoria.co.uk

croX-1’s picture

Thank you very much! I found a way to do what I need with ConTemplate by just adding the css the gallery module uses (if someone needs the code i will post it).

But anyway what you post will help me for some other stuff. Big thanks again!!!

croX