I would like to control which script tags and stylesheet links are injected into the head section by Percussion.
It seems that jquery and jquery-ui along with perc_decoration.css and a jquery-ui theme are loaded. I don’t want to load jquery-ui and would prefer to load jquery at the bottom of the document. I have a suspicion that decoration.css is conflicting with my own css so I need to either override those styles or not load it.
Where can I find documentation on what elements the styles in perc_decoration affect? It appears that some of the region styles don’t apply to my Percussion version (3.2.4).
No, you can not control which JS or CSS files are linked in the header section. CM1 will automatically source particular java script files in order for the widgets to function correctly.
Take a look at this post another customer recently posted on the community here.
Unfortunately there are no documentation to see what styles the perc_decoration will apply to. What you can do is use the Development tool in your browser to see what Css is being applied or conflicting . For example if your using Google Chrome you can use their “inspect Element” feature. To do this right-click on the area you would like to inspect and select “Inspect Element”.
This would seem to be a very bad design decision. I can do this very thing with several other CMS systems. So If I want a different version of jquery or jquery-ui for instance or if I don’t want them at all I don’t have a work-around?
As for the styles in the perc_decoration stylesheet, can anyone at least tell me which styles v3.2.4 uses? The documentation for Percussion seems sparse at best. I would expect to find some developer documentation that outlines how the system parses templates etc…
Yes, I understand the use of browser dev tools. I use them every day. I’m using them now to fix style rules broken by all of the extraneous div tags introduced by the template builder.
Do all of these “perc-region perc-fixed perc-horizontal ui-helper-clearfix” divs get published or are they removed? I can understand how they allow the template builder to function but after publication I can’t see what purpose they serve.
Unfortunately this is the way CM1 currently behaves. I think your right, a change to this behavior in our application would be beneficial for customers. As you can see from the post I provided in my last response you are not the only customer who would like to see this changed in CM1.
You should post this as an idea here in on our community and our VP of products here at Percussion can review it.
To answer your question, Yes the divs are added for functionality. After publishing a page the application does not strip these divs out. The architecture of CM1 is designed for ease of usability for customers to be able to edit and change content simply and effectively.
I can understand how you may want to remove these snippets of code to maybe tidy up your files but our products adds them in order to work effectively.
I’m betting that feature requires all the tags and extra divs to be on the published pages in order for the feature to work.
Stuart, I’m with you though. Options to change the jquery version being used along with options to optionally include other Percussion resources in the published version (at least) of a site would be very beneficial. I think I’ve brought it up multiple times, one of which is my post Armani linked to above. another is the idea request I mentioned above.
Thought I’d also say that I have an open ticket with Percussion Support regarding some of the discussion in my idea post, and they’ve come back and informed me that it sounds like a bug exists where if a page has ever had a navigation widget on it, that even if it’s later removed, the publish version of the page is still getting that widget’s related resource files included. They said they are working on a fix, so that’s good at least.