In theme.inc, $vars['dom_id'] is set unconditionally and then inserted as view-dom-id-xxx in views.tpl.php. However, there is no way using a $view object to find out what dom_id was assigned to the view. It looks as if that information is lost to other modules which may want to use it unless it is captured from the theme variables and stored for later use.
My reason for asking is I am helping with a patch for the scrollable module to allow its js code document ready function to properly refer to an individual view on the page, and although the dom_id is clearly visible in the css, there appears to be no way to get access it from the scrollable module implementation.
I don't know the Ajax code very well, but am wondering why theme.inc doesn't simply say something to the effect of...
static $dom_id = 1;
$vars['dom_id'] = !empty($view->dom_id) ? $view->dom_id : $dom_id++;
$views->dom_id = $vars['dom_id'];
Comments
Comment #1
garywiz commentedTypo: of course I meant "$view->dom_id" not "$views->dom_id". Sorry.
Comment #2
esmerel commentedGeneral closing of issues with no activity for 6 months