Apache Solr View adding an image field and render it using a custom views handler

Good day all,

I'm trying to make work the apache solr view module with an image field, for doing so I'm adding the cck image field to the apache solr index and trying to show it through a custom handler as the views default handler is not showing it when checking the views page. Is there any way to format the image using the image resizing module. I'm using drupal 7

Thank you.

I created a custom module with this code

function custom_visual_apachesolr_update_index(&$document, $node) {
// Index field_mont_imagen as a separate field

if($node->type == 'motura') {
if (count($node->field_mont_imagen)) {
foreach ($node->field_mont_imagen as $image_lang) {
foreach ($image_lang as $image) {
$document->setMultiValue('sm_field_mont_imagen', $image['filename']);
}
}
}

}
}

function custom_visual_apachesolr_query_prepare(DrupalSolrQueryInterface $query) {
$query->addParam('fl', 'sm_field_mont_imagen');
}

/*
hook_views_data_alter() exposes our new field and sort to views
*/
function custom_visual_views_data_alter(&$data) {
$data['apachesolr_node']['sm_field_mont_imagen'] = array(
'title' => t('Montura image'),
'help' => t('Image for montura cck.'),
'field' => array(
'string' => TRUE,
'handler' => 'custom_visual_handler_field_image',

Domain Access help

Drupal 7.10
Domain Access 7.x-3.1
Views 7.x-3.0

When having 1 primary domain and 2 other domains, a basic view which displays nodes only returns results on the primary domain. On the other domains, the view returns nothing.
Each node is published to each domain without using the 'send to all affiliates' option.

Can someone tell me how to create a view that gives results on every domain without using 'send to all affiliates'?

Thanks in advance.

Multiple blogs help

Hello,
I would like to know how to create several blogs. Say like Blog X, Blog Y, Blog Z under same site (means in this same CMS or under one domain). If it is not possible to achieve, is there any tricks i could use (like split using tags, etc..).

Thank You in advance
Daranivasan.A (Vasu)

How to intergrate external php file with drupal

Hi all,

I'm trying to display the contents of the external php file which is located outside of the drupal root folder. My external php file contain form elements. Is there any possible way to do so instead of using iframe. i'm searching for an alternative way..

Webform with prefilled values

Hello all,

How can I prefill a webform with specific values? I'd like to do two things: if the user clicks on the contact page, the webform appears with nothing prefilled. But I will include a link on another page and if the user clicks on this specific link, I'd like some fields (not all of them) to be automatically prefilled. How can I accomplish this?

Thanks for any help,
Muriel

Mail to link with specific body

Hello all,

I'm trying to build a site for someone who wants to deliver meals to companies. I don't know much about building websites, I admit, but I'm trying to help her. I'm using Drupal 7 to do so.

I was wondering: how can I declare variables that can be used (set the value or retrieve it) in the body of any page?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x