Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#265 2009-09-16 22:20:02

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: hak_article_image

I am going crazy with a problem that doesn’t seem to make sense. Maybe I am not implementing it correctly but I have used that following code to output a list of thumbnails to work with thickbox but it seems that hak_article_thumb is not passing the class to the anchor tag even though I have assigned one.

I have even recreated an entirely new form to test this so I have a feeling that I may be doing something wrong. But I am not seeing it. The following code is contained within a div and is outputting everything else correctly. It will pass a rel successfully if I add that attribute but not a class.

Doesn’t hak_article_thumb not support classes? I thought it would pass a class to the containing anchor tag if link=“1” is defined. Or is there some stupid syntax error that I am blind to here?

<txp:hak_article_thumb class="thickbox" link="1" linktype="image" limit="8" offset="1" />

Thanks,

cpk

Offline

#266 2009-09-17 00:05:57

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: hak_article_image

I have done some further testing and discovered that the hak_article_image tag will not pass the class attribute I have assigned to it.

I have reviewed the instructions on this and made sure that I included the link=“1” attribute/value pair. In theory it should pass on whatever class I have assigned to the anchor tag wrapping the image (or thumbnail image as the case may be). I have included a rel attribute as a “control” and in each case the thumbnail AND the full size image called from the form the rel attribute is honored but the class attribute is not.

I am using both the hak_article_image and hak_article_thumb tags within a form. I have even reinstalled the plugin. Running on a Txp 4.20 install.

Thanks,

cpk

Offline

#267 2009-09-17 00:24:35

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

class gets attached to the wraptag. It’s a convention so I didn’t want to change it. Use linkclass to attach a class to the link.

It’s a little confusing because when you use hak_article_image_link in a hak_article_image form it takes class instead of linkclass, sorry about that.


Shoving is the answer – pusher robot

Offline

#268 2009-09-17 01:00:48

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: hak_article_image

Thanks Patrick! That was it.

cpk

Offline

#269 2009-12-03 22:48:39

Cantide
Member
From: Wellington, New Zealand
Registered: 2004-03-03
Posts: 27
Website

Re: hak_article_image

Not sure <txp:hak_image_alt /> is working in TXP 4.2.0 … I get zero output from this in a form at the moment.

Last edited by Cantide (2009-12-03 22:49:17)

Offline

#270 2009-12-04 03:31:36

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

It works for me. What does your tag and form look like?


Shoving is the answer – pusher robot

Offline

#271 2010-01-25 19:46:38

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: hak_article_image

I’m trying to exclude one image from hak_article_thumb… but there’s a catch.

I currently have a section “/portfolio/ where I’m using hak_article_thumb and jcarousellite to display various projects with a slideshow of images associated with that project (article). This works great.

I set up another carousel on my home page using jcarousellite + hak_article_thumb again. This one shows only the first article image (limit=“1”)from each project (article) from the category “featured”. This is also working great. Users can now flip through my features.

Problem: My ‘feature’ area and my /portfolio/ carousels have different image dimensions. (The features are larger). I therefore would like to EXCLUDE the first article image (the feature image) from the carousel on /portfolio/.

So the result would be, click on a large feature image on the front page, go to the article about that project, where a carousel shows all the images from that article EXCEPT the first image – the feature image.

The first thought was to use offset and limit, in order to skip the first image, and then not allow it to show the whole list – therefore hiding the first image. Problem – not all the articles(projects) have the same number of images associated with them.

Is there a way to do this? Or a better way to do this?

Do I need to make a separate ‘feature’ article and somehow just hardcode those images to link to a different article?

Any help greatly appreciated! Thanks

Offline

#272 2010-01-25 20:57:35

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

If I’m understanding correctly you should be able to just use offset in the carousel. Limit should adjust itself accordingly if my memory of how this works is correct.


Shoving is the answer – pusher robot

Offline

#273 2010-01-25 21:18:54

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: hak_article_image

Ah! I misunderstood how offset works – adding offset=“1” does work in that it is now not displaying the first ‘feature’ image.

However, something about adding offset seems to make the carousel and thickbox not work. (Which obviously might be outside the scope of this forum but any suggestions are highly appreciated.)

Edited to clarify – The correct images are still showing up, but they’re no longer in a carousel. They just appear in an unordered list with the now non-functioning controls below.

Last edited by Something Clever (2010-01-25 21:20:54)

Offline

#274 2010-01-25 21:33:53

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

Without actually looking at the actual markup and what jCarrousel is expecting it’s hard to say but it seems like it’s missing something to attach the carrousel to. Are the proper classes etc being applied?


Shoving is the answer – pusher robot

Offline

#275 2010-01-25 22:02:42

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: hak_article_image

Adding offset=“1” seems to still generate the exact same source code EXCEPT – as planned – it doesn’t display that first image. class=“thickbox” is still being assigned and the ul is still in the proper div for the carousel.

Offline

#276 2010-01-25 23:35:51

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

I don’t it’s hard to see what could be wrong without actually looking at it. Are you getting any js errors that could be causing the carousel initialization from firing?


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB