Dynamicload currently relies on a theme-specific include file to pass the jQuery selector for the main content area to the browser.
It would be better to be able to at least try to determine this programmatically.
Is there an existing element that (a) is the same for all themes and (b) is a direct child of the main content area in all themes?
My first thought is the breadcrumb div, which in jQuery would select as $('div.breadcrumb'). Of course, this could be different if a theme has overridden theme_breadcrumb() and output it as e.g. a different element type, but it seems likely that would be fairly rare. The more likely problem is that the breadcrumb is present on the page but is not in the main content area, or is nested in another element. Is this the case in existing themes?
Is this the best bet for a selector? Other options?
Comments
Comment #1
dman commentedI'm not keen on the way jstools does that theme-specific style thing.
Couldn't we get your theme template.php to respond to a hook_jstools_settings() sort of thing?
This question is out of scope for this particular issue, but I think it's be a lot tidier, and certainly easier to manage and distribute with custom themes.
When I saw
I expected to be able to go
in my template.php, not add stuff to the distribution. wildcarding {theme} with {themename} almost like usual.
Or something similar - mytheme_dynamicload_data() would of course be more normal.
Comment #2
nedjoMoved this comment to a new issue, http://drupal.org/node/144071