Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Added some more info to explain that the function is called
Source Link

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.

To clarify my question, the image in this view is normally displayed, and I "dynamically" create a link to another view which is not related to the image. I wrote a function (in my template) to compute this link, and I need to know how to add this link to the image field within my_theme_preprocess_views_view_field_myviewname(&vars). The preprocess function is executed several times to build the view, I tried to use var_dump(vars) to see where is the image field, but it generates a too huge amount of data.

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.

To clarify my question, the image in this view is normally displayed, and I "dynamically" create a link to another view which is not related to the image. I wrote a function (in my template) to compute this link, and I need to know how to add this link to the image field within my_theme_preprocess_views_view_field_myviewname(&vars).

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.

To clarify my question, the image in this view is normally displayed, and I "dynamically" create a link to another view which is not related to the image. I wrote a function (in my template) to compute this link, and I need to know how to add this link to the image field within my_theme_preprocess_views_view_field_myviewname(&vars). The preprocess function is executed several times to build the view, I tried to use var_dump(vars) to see where is the image field, but it generates a too huge amount of data.

Added more details about what I expect to do.
Source Link

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.

To clarify my question, the image in this view is normally displayed, and I "dynamically" create a link to another view which is not related to the image. I wrote a function (in my template) to compute this link, and I need to know how to add this link to the image field within my_theme_preprocess_views_view_field_myviewname(&vars).

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.

To clarify my question, the image in this view is normally displayed, and I "dynamically" create a link to another view which is not related to the image. I wrote a function (in my template) to compute this link, and I need to know how to add this link to the image field within my_theme_preprocess_views_view_field_myviewname(&vars).

Source Link

How to programmatically add a link to an image field in a view

I have a view with an image field and other fields, and I need to link the rendered image, not the content which is one of the configuration choice, but on another computed filtered view. I think that I should use my_theme_preprocess_views_view_field_myviewname to catch this field, using it's name as selector then wrap it with the computed link, but didn't find how to do it.