Jquery javascript and css driving me crazy
Permalink
I'm getting worn out trying to get things to work in a theme where one piece works when not signed in to C5, another doesn't if the tool bar shows, and another doesn't if it's in edit mode. I feel like I do more work trying to get all the included core files to play nicely with different versions of scripts and files.
Is there documentation that helps with the process of implementing jquery components so it works across the board? I'm seeing so much fragmented documentation and discussion on it, it's exhausting. Example: Including accordion functionality for one.
Is there documentation that helps with the process of implementing jquery components so it works across the board? I'm seeing so much fragmented documentation and discussion on it, it's exhausting. Example: Including accordion functionality for one.
This won't help for existing 5.6 sites, but the new assets manager in 5.7 should eliminate this problem.
I haven't had the chance to check out 5.7. The sites I'm working with are a handful of versions between 5.4 and 5.6.
I'll play around with 5.7 and check that feature out. Thanks for the reply.
I'll play around with 5.7 and check that feature out. Thanks for the reply.
I managed it this way. Load core jQuery 1.x when signed in, load jquery 2.x when signed out.
https://github.com/core77/c5f5boilerplate/blob/master/elements/heade...
https://github.com/core77/c5f5boilerplate/blob/master/themes/c5f5boi...
https://github.com/core77/c5f5boilerplate/blob/master/themes/c5f5boi...
https://github.com/core77/c5f5boilerplate/blob/master/elements/heade...
https://github.com/core77/c5f5boilerplate/blob/master/themes/c5f5boi...
https://github.com/core77/c5f5boilerplate/blob/master/themes/c5f5boi...
Thanks core77! This helps a ton as I didn't even think about this direction.
If you don't mind:
1. In the header_required, there's the condition for "ifRegistered". But in the footer there's the condition for "ifLoggedIn". What are the differences in these two? (I've only used "ifLoggedIn" and "ifIsEditMode").
2. I assume you have it as a package based on the
piece in the header element.
Thanks again.
If you don't mind:
1. In the header_required, there's the condition for "ifRegistered". But in the footer there's the condition for "ifLoggedIn". What are the differences in these two? (I've only used "ifLoggedIn" and "ifIsEditMode").
2. I assume you have it as a package based on the
<?php Loader::packageElement('header_required', 'c5f5boilerplate'); ?>
Thanks again.
Not tested, but i would say that both methods work.
Description here:
www.www.concrete5.org/documentation/developers/permissions/users...
And yes, it's a package.
Description here:
www.www.concrete5.org/documentation/developers/permissions/users...
And yes, it's a package.