Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a view block that loads jplayer playlist in a region of all my pages. I have enabled ajax_pages module so that default configuration is running. I play the audio then navigate to another page but the player is not persistant. Audio quits and does not return to point in song where it was when the page was reloaded. What am I doing wrong?
Comment | File | Size | Author |
---|---|---|---|
#1 | Screen shot 2013-10-08 at 8.56.12 AM.png | 42.87 KB | avillanueva-npr |
Comments
Comment #1
avillanueva-npr CreditAttribution: avillanueva-npr commentedFollow the readme that comes with the module
Your html.tpl.php should follow this general, overall, structure:
That ID is important. It can be whatever you want but I'm using page-wrapper.
Then in the settings under "/admin/config/user-interface/ajax-pages"
It should look similar to the attached image:
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedHi avillanueva-npr,
Thanks for the reply. I did eventually find the readme. And I followed the instruction thoroughly(several times). However, I am getting this error now and don't know how to fix it.
Notice: Undefined variable: persistent in include() (line 19 of /Users/banghouse/Sites/banghouse/sites/all/themes/studio/templates/html.tpl.php).
My ajax_pages module configuration is exactly what you have shown attached.
I have this in my html.tpl.php:
I have this is my template.php which is in my omega subtheme named "studio":
I have this in my studio.info:
And my view block that is loading a jplayer playlist is placed into my new persistent region which is in the footer zone.
Comment #3
jamix CreditAttribution: jamix commentedYou should be getting a PHP notice with that, too, because you're passing
$vars
tostudio_preprocess_html()
but refer to it as$variables
in the function. This should fix it:Comment #4
Stathes CreditAttribution: Stathes commentedHey I have tried the following implemtation but not with "persistent" - I have a scroll area which is getting refreshed each Ajax load and its reset to the top. Since this data doesn't change I do not want to reload and would be nice to keep scroll position. I would assume what was mentioned here would apply because your module reloads the page top, page, and page bottom.
After trying what you have above:
- printing an area "messages" in html.tpl.php.
- created a template.php file and put in your code and changed all instances of "persistent" to "messages". (I didn't have this file before could that be the issue?)
Unfortunately this doesn't seem to be working after clearing the cache. Would you possibly know why this is? I think this module is spectacular much better than drujax and Jquery Ajax load, and if I could just nail down this small issue I would be super stoked!
Thanks for your time and an incredible module!!