I've created a file view called "image_gallery" outputting these fields:
- filename
- field_taxonomy_publications
- This field is a term reference, rendered in plain text and attached to my files via the File entity (fieldable files) module.
- field_body
- This field is a textfield, rendered in plain text and attached to my files via the File entity (fieldable files) module.
- URI
I'm using the EVA: Entity Views Attachment module to attach this view to my "Gallery" nodes. Furthermore, i've created a relationship of "File: Content using [MY_IMAGE_FIELD]" and then, using that relationship, a contextual filter of "Content: Nid" (default value being "Content ID from URL"). This all means that the images my users add to their nodes with display as proper views slideshows.
I've created a template with the name "views-view-fields--image-gallery.tpl.php" to render the images with proper title and alt text. Here's the code:
<img
src='<?php print image_style_url('MY_IMAGE_STYLE', $fields['uri']->content) ?>'
alt='<?php if (!empty($fields['field_body'])) print $fields['field_body']->content ?>'
title='<?php print $fields['filename']->content ?><?php if (!empty($fields['field_taxonomy_publications'])) print ' | ' . $fields['field_taxonomy_publications']->content ?>'
/>
This is all working swimmingly.
I've also copied "views-slideshow-controls-text.tpl.php" from views_slideshow > theme to my themes template folder.
My goal is to print out two specific fields in-between the "previous" and the "next" controls. I want to print out the very same title string that can be seen in the above code, concatenating the "filename" field and the "field_taxonomy_publications" field. Also, i've eliminated the pause control, as it is unneeded. So the code would look something like this:
<div id="views_slideshow_controls_text_<?php print $variables['vss_id']; ?>" class="<?php print $classes; ?>">
<?php print $rendered_control_previous; ?>
<markup>"filename" field + " | " + "field_taxonomy_publications" field</markup>
<?php print $rendered_control_next; ?>
</div>
I've toyed around long enough with "views_embed_view" and "views_get_view" without any success. I'm stuck.
Any help is greatly, greatly appreciated.
Comments
Comment #1
stephen Piscura CreditAttribution: stephen Piscura commentedI selected the wrong version in my original post.
Comment #2
jeffschulerHey Stephen,
Is it that your new theme template (views-slideshow-controls-text.tpl.php) is not being used, or that you want a hand with what should go inside it? (Or both?)
Comment #3
NickDickinsonWilde