I manage to add a wrapper DIV for node display sub-module.
I'm now able to easily theme this node element.
Patch tested.

Comments

nancydru’s picture

Status: Reviewed & tested by the community » Needs review

You cannot set your own issue to RTBC - that requires at least one other reviewer/tester.

I will check it out.

nancydru’s picture

How does this work better than

#block-taxonomy_image-0 img {
  something...
}
thepanz’s picture

First of all: sorry for my RTBC issue status.

Using "Node Display" I didn't found any "#block-taxonomy_image-0" ID inside rendered HTML in my nodes.

Some disadvantages of IDs:

- Having a unique ID is difficult to select "all" taxonomy-images for theming using CSS
- TI have to create unique ID for each node taxonomy-images (think about a list of nodes inside a View and valid HTML issues)

maybe using #prefix and #suffix form elements isn't the cleanest way to resolve this issue.. but I didn't find any other (better) solution :)

Regards

nancydru’s picture

"#block-taxonomy_image-0" is what is generated for the block itself and applies only to that block. TI already does have an option to generate a wrapper (I don't recall if I have it turned off inside that block) for all images by default. I'm just trying to figure out if there is a way to do what you want that's already in TI.

thepanz’s picture

Using Node-Display no HTML is outputted for images, only a "\n" separated list of IMG tags is printed inside the content.
Maybe a better solution is to provide an overridable theme() function also for "Node Display" sub-module.

Regards

nancydru’s picture

I think maybe you inadvertently have a very old version of that module. The "taxonomy_image_node_display.module" should live within a directory called "taxonomy_image_node_display", which should be under "contributed", which should be under "taxonomy_image." If it is still in the main module directory it is an old version and should be deleted. You may have to disable and re-enable it.

Path within your module folder: taxonomy_image/contributed/taxonomy_image_node_display/taxonomy_image_node_display.module

thepanz’s picture

I'm using latest -dev version.
Maybe you looked at the the patch file that doesn't have any path displayed before module name.
I've created the patch using TortoiseCVS under Windows.

nancydru’s picture

I can do this with the code that's already there:

a.taxonomy_image_links img {
  border:2px outset black;
  margin-right:20px;
}

Your patch will give you nothing over this, AFAICT.

I am committing a change to change taxonomy_image_links to taxonomy-image-links.

thepanz’s picture

I found why we don't have the same HTML code!
I'm displaying only images while you've enabled "Link displayed Taxonomy Image to taxonomy/term/n page", (correct me if I'm wrong).
Try to display only images :)

With my "added DIV" I manage to place all images (and images with link) in a the top-left side of my node content (using floats). Using only link class (as you suggested) this couldn't be possible.

Regards

nancydru’s picture

Status: Needs review » Fixed

Committed to 6.x only. It is not a setting though. If you do not link to the term page, you will get the wrapper. Thank you for the patch.

Please let me know what you think after you test it; I am just about ready to produce a new release.

thepanz’s picture

Hi, I updated my -dev version with your latest commit.
My 2 cents:
- the DIV would be useful also for linked images (same reason as before, fine theming can be done also on single link class)
- the DIV should be themable/overridable... maybe using the theme() hook

thepanz’s picture

Status: Fixed » Needs review
StatusFileSize
new2.24 KB

Added themable function for TI images.
This can be used to theme images inside a list, etc

nancydru’s picture

Status: Needs review » Fixed

Committed.

thepanz’s picture

Hi, thank you for committing my patches. Hope my posts didn't stress you too much! :)

Regards.

nancydru’s picture

Doing patches is a lot less stressful (other than typing really long Windows path names). Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.