Has anyone played around with jQuery Mobile and EE?
The addition of the hash to the url doesn’t mesh well with EE’s way of working….
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
December 08, 2010 3:07am
Subscribe [6]#1 / Dec 08, 2010 3:07am
Has anyone played around with jQuery Mobile and EE?
The addition of the hash to the url doesn’t mesh well with EE’s way of working….
#2 / Dec 16, 2010 11:10pm
Bump.
Anyone?
#3 / Jan 04, 2011 6:07pm
Yes, I’ve been playing around with it quite a bit.
My experimentation thus far has been creating a new template group ( /mobile/ ) that’s running jqueryMobile. Being a mobile version of the site, it’s pretty watered down and just hitting the important blog topics, press releases, etc. That given, it’s all working great for its purpose.
The only real frustrating thing I’ve run has been pagination. I haven’t figured out how to get EE to spit out new pagination pages with a different template directory ... and… the hash tag.
#4 / Jan 04, 2011 6:13pm
I can’t seem to get things to work; the hash in the url plays havoc no matter what I try. Don’t suppose you’d mind sharing your template?
cheers,
#5 / Jan 04, 2011 6:41pm
Can you explain what issues you’re running into?
Are you pointing to a subdomain or running a specific /mobile/ dir (template group)?
I haven’t experimented running a subdomain this far, though I would see how issues may arrise with that hash.
#6 / Jan 04, 2011 10:41pm
I’m experimenting with a /mobile/ template group. I first ran across jQuery mobile on nettuts, and I’ve been sort of basing my approach on that tutorial, eliminating the RSS parts.
Hmm, things seem to have started working, somehow. I was getting no results from a weblog:entries tag, but it’s outputting results now.
If you’ve found any helpful tricks or great tricks, please share!
cheers,
#7 / Jan 19, 2011 10:53pm
Dylan, vforp,
Have you guys found a solution for this?
My project is a complete domain for the mobile site - mobile.example.com (not just a dedicated template group) - managed under EE. I am running into the same #hash problem and I am not sure what a good solution could be to work with different pages and hopefully other template groups within this same domain.
Sure one solution is to output everything needed into a single page, and just make one huge output to that page, but ideally this would be broken down into different pages, and hopefully different template groups.
These two ways to manage urls don’t seem to get along very well.
Any ideas or progress on your guys’ side?
Thanks,
Sebastián Jaramillo T.
#8 / May 05, 2011 10:56pm
Hi Dylan,
you can always deactivate the hash idea by using rel=“external” added to links. this way you can keep full functionality of url and segments, hashes and url parameters (if these are used) intact in a fairly easy fashion ... what you are loosing are the benefits of jQuery mobiles ajax actions and avoiding to load repeating content again (header, footer, etc) ...
#9 / May 06, 2011 10:11pm
Can’t you just design your URL structure as you normally would, and use jQuery Mobile’s AJAX loads to load in the page content as needed?
I don’t see the issue with EE…
#10 / May 09, 2011 12:27pm
Thanks for these replies.
Actually I was eventually able to solve this. The trick was in the way links and hrefs were written (in my case, and for my particular purpose). Now template groups and templates work as I needed them to work. It’s all good now.
#11 / Feb 08, 2012 10:59pm
I know this post is dated a few months, but I can’t find an answer posted anywhere. How do I get around the “#” in the url.
my link looks like this
<a href="/mobile/test">Test Button</a>But expression engine takes it to
<a href="http://domain.com/mobile/current_page/#mobile/test">http://domain.com/mobile/current_page/#mobile/test</a>It doesn’t take the current page out of the URL, and it adds the “#”
have a template group called “mobile” and all of my templates are in that group.
What was your fix?
Thanks,
Jason
#12 / Feb 08, 2012 11:47pm
jasonathopi,
To be honest I am not exactly sure what the solution was, I stopped the direction of that project and took another route. From what I recall it was something simple in the way those hrefs were written. Try taking the initial “/” from the url, I think that might help. My direction when doing this was different though, because I was dedicating a complete subdomain to the mobile site, using MSM, and just grabbing the data channels from the main site. My challenge was to be able to have different template groups work, and something in the building of EE urls didn’t work with jQuery Mobile.
Honestly I would suggest solving the mobile site with Media Queries. That was the reason why I stopped the project with that jQuery Mobile solution. I believe there are many reasons to go in that direction instead, unless of course you have a good reason to be building it like that.
Hope that helped a bit.
Sebastián Jaramillo T.