Hello,
I am relatively new to views theming and trying to create a view for an auction site. For the product view, there is a field for a timer that shows "auction expires in... x seconds". In the expanded node view, I have written a javascript for the timer countdown but can someone give me a pointer to extend that some functionality to a view.
I am describing what I've done already...
For the node view, I created a function like this...
drupal_add_js(array(
'Auction' => array(
'expiry' => $node->auction['expiry']
.....
drupal_add_js(drupal_get_path('module', 'auction') . '/auction.timers.js', 'module', 'footer');
When I created a product view, I edited the ***expiry.tpl.php file to add the same set of stuff...
drupal_add_js(array(
'Auction' => array(
'expiry' => $row->{$field->field_alias},
.....
drupal_add_js(drupal_get_path('module', 'auction') . '/auction.timers.js', 'module', 'footer');
<?php print $output ?>
Now what I am stuck with is the fact that the $output variable is NOT the one affected by the javascript at all and obviously not showing anything... Maybe this sounds extremely easy for someone experienced... Please help out...
Comments
Comment #1
dawehneris the js added to the site?
if yes, i would check whether the js uses certain selectors (classes ids...) which should you provide in the output of the viewfield
this is quite hard to answer without knowing the script
Comment #2
esmerel commentedNo updates since request for more info.