Can I add a javascript slideshow to my website articles even if Im using a proprietary CMS?
February 6, 2012 3:49 PM   Subscribe

Can I add a javascript slideshow to my website articles even if Im using a proprietary CMS?

I am building my company's (a magazine) website in a proprietary CMS from a company I dont want to name.

The reason I am asking you guys instead of them is because it takes forever to get a satisfactory answer over there and they tend to be steering me towards options Im not always too keen on and that arent as customizable as I'd like them to be.

What I am wondering is, since each article I place thru this CMS allows me to toggle over and mess with the SOURCE to better edit and build the article, is it possible to use a javascript slideshow (like say this one, which I rather like) even though I would probably have to place it manually on every single page?

We are a very photo-heavy magazine and I'd rather not have to minefield these pix throughout each story and this slideshow seems like an elegant solution to that.
posted by Senor Cardgage to Computers & Internet (10 answers total)
 
Hard to say without knowing the CMS, but unlikely.

Every CMS editor I have ever seen strips javascript and most html for that matter. But the nest way to find out is to just try and see. Add a little JS into the editor, hit "save" and see if it gets saved or stripped out.
posted by drjimmy11 at 3:58 PM on February 6, 2012


It would depend on the specifics of the CMS, but if the Javascript does not get stripped then theoretically it should work. Of course you might be placing your JS in odd places on your page, so the code is going to look a mess - also whatever code you are writing will have to accommodate that.

Do you want to hear all the reasons why this may be bad practice and difficult to maintain? :-)
posted by Artw at 4:01 PM on February 6, 2012


Response by poster: Sure. Shoot.
posted by Senor Cardgage at 4:01 PM on February 6, 2012


Well, as I say, the code will be ugly, for a start, which may or may not be a problem to you since it's under-the-hood, but it would bother me and It's the sort of thing that, if bad enough, can make pages horrible to work with.

Since your JS is not in a separate file it won't cache and it will have to be reloaded for each page it's on, which will bloat your site.

Also, since you will have to insert the same JavaScript into the CMS multiple times you are setting yourself up for maintenance problems, basically whenever you change it at all you are going to make sure they are are all updated to match or you'll have a confusing mess.
posted by Artw at 4:07 PM on February 6, 2012


Response by poster: Yeah. Thought so. Gah, the horror of the third party slideshow they have available for me to use.
posted by Senor Cardgage at 4:14 PM on February 6, 2012


*If* you can add JavaScript to the header of *all* your pages then this might not be too bad. If the existing CMS includes JavaScript you may be able to add to that, and then create your slideshows by adding a group of photos to a story like <div class="customSlideshow"><img><img><img>

The JavaScript you added to your header might include jQuery, MooTools, or Prototype or whatever, and then turn that .customSlideshow into an area that has all the proper slideshow behaviors by modifying the code. A well written piece of JS will fire when one or more elements with the class customSlideshow is on the page.

This is all incredibly speculative, but that's how I'd be thinking about this.
posted by artlung at 4:14 PM on February 6, 2012


Of course, if you can get your CMS to upload a .js file somewhere you can get to it, then use your script tags to link to it rather than to contain inline Javascript, you will be in a much better position.
posted by Artw at 4:15 PM on February 6, 2012


Response by poster: Well wait, we have a js folder set up thru the CMS company. Couldnt I just load the relevant scripts there and call them up on the page?

(Note, Im sorta new at all this)
posted by Senor Cardgage at 4:27 PM on February 6, 2012


If you can put your slideshow script file in there and then call it from your page you'll be in fairly good shape, yes.
posted by Artw at 4:29 PM on February 6, 2012


Response by poster: If I can do this without crashing the entirety of the North American webzone, then I shall be a hero.
Hmmmmmm
posted by Senor Cardgage at 4:39 PM on February 6, 2012


« Older Non profit rates   |   Can you help me find movies about or around the... Newer »
This thread is closed to new comments.