Is it possible to use other than Image Title and Alt, something like Node: Title or other CCK field? And how it is done?

Comments

rashad612’s picture

This feature is not implemented yet. Hopefully soon.

wolfdream’s picture

Can you please point me in wright direction how this could be done?

wolfdream’s picture

Assigned: wolfdream » Unassigned

1 more q...
How can I link alt and title text to their node?

rashad612’s picture

alt and title is an img tag attributes.

wolfdream’s picture

StatusFileSize
new12.94 KB

If you could take a look at js that I modified to use other filds from views.
Another modification in viewscarousel3d.js add class inviz on views field: $(".views-field-title").addClass("inviz");
Js works for me: http://www.broj1.hr/2010/11/14/3d

liquidcms’s picture

since this is just JS and looking at your code is it safe to assume you have just hard coded the specific field you want into the JS or am i missing something here.

trying this out but i 2nd the idea that being able to define which fields are used for the txt would be very nice.

solian’s picture

Additionally,
You can quite easily customise the field you are using in a view to turn it into your desired thumbnail.
And with tokens for node [title] etc you can modify these on a per view basis.
e.g.
choose 'rewrite the output of this field'.
tokens you need must be included as fields before this one, as hidden fields perhaps.

<img src = "[field_{your_content_type}_image_fid]" title = "[title]" alt = "[title] some alt text blah blah "  />

I believe some are also using Imagfield tokens for similar workarounds.

liquidcms’s picture

@solian - have you actually tried this?

i think this does work but possibly you must set the img field formatter to PATH; which then means you are not able to use imagecache (or any of the other image formatters).

solian’s picture

Hey liquidcms,
Yes I have tried it with Tokens and ImageCache.

The url from [field_{your_content_type}_image_fid] is an ImageCache thumb url.

Type to choose is {your_content_type}_{Your_imagecache_preset} URL.

Cheers

liquidcms’s picture

hmm.. sounds promising.. but maybe this is Views 3? pretty sure in Views 2 that
[field_{your_content_type}_image_fid] is not the path to the imagecached version (presumably based on which preset you select as your formatter?).

and sorry; not sure what "Type to choose is {your_content_type}_{Your_imagecache_preset} URL" is referring to. but i'll play around with it a bit and see if i can get something to work.

liquidcms’s picture

ahhh... use the formatter which is the URL of the preset.. doahhh.. yup, that works.. thanks.

still, however, it would be nice to be able to simply have it show the text for fields defined in the view as opposed to the title text for the image as it would allow a lot more flexibility. for example; you can add div, css, etc to pieces of the text.

liquidcms’s picture

ok, not the best fix but i did a small tweak to the cloud carousel JS and combining that with solian's idea of adding views "tokens" into the re-written img field i came up with this:

inside the JS i split the title tag value on a comma separator and wrap the pieces in div's so that i can theme accordingly.

so with my image field rewritten as this:

<img src="[field_profile_image_fid]" title = "[title], [field_company_value], [field_usertitle_value]" alt = "[title]"  />

i get this:

<div class="viewscarousel3d-title-text" id="v3ddefault-title-text" style="display: block;">
  <div class="v3d-field-0">Node Title</div>
  <div class="v3d-field-1">My Company</div>
  <div class="v3d-field-2">User Title</div>
</div>
liquidcms’s picture

StatusFileSize
new12.42 KB

lets try that again...

liquidcms’s picture

and for my example, the result looks like this: http://screencast.com/t/X9eY8uaS

rashad612’s picture

This feature is coming in the next release :)

ranx’s picture

subscribing

david3000’s picture

subscribing

benchesters’s picture

StatusFileSize
new70.12 KB

I was just looking for this and worked it out. These two modules are necessary:

filefield_paths
imagefield_tokens

It's now possible to use node tokens in the fields so that the ALT text and Title text grab the node title (if that's what you want) automatically. I used [title-raw] in mine, as just using [title] grabbed the html code if there was an apostrophe in any of my node titles.

I have added a screen grab so you can see what I did on the newly created image field. Hope this helps a fellow novice! This works like a dream now..;)