Whispar1 Posted February 18, 2013 Share Posted February 18, 2013 (edited) Hopefully someone can offer a little guidance on this. I created a cms page that will contain a gallerific image gallery. I am almost there but need to find the best way to link a few custom css and .js pages. I was able to call the .js pages in the tinymce editor for the cms page but am unable to do so with the css pages. For now I added the css to global.css but still cant keep tinymce from stripping some of my code. It's a crude way of doing it Im sure... Here is the cms page so far (yes its a mess) http://69.36.191.225...&controller=cms Edited February 28, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 19, 2013 Share Posted February 19, 2013 maybe edit cms.tpl file in yout theme directory? it's the best and simplest way in my opinion, you dont have to add css /js via tinymce (i dont thin so that this method work) 1 Link to comment Share on other sites More sharing options...
Whispar1 Posted February 19, 2013 Author Share Posted February 19, 2013 Thanks for the input. Yeah, I'm not having much luck doing it this way and it's only one cms page that will have the gallery. I have all the code from my static site (where it works flawlessly) just can't get it to render in the Presta Environment. Link to comment Share on other sites More sharing options...
Whispar1 Posted February 20, 2013 Author Share Posted February 20, 2013 (edited) Ok so I got brave and modified my CmsController.php file to call the custom css and js files as below: (is this correct? - i have a hard time even spelling php..) public function setMedia() { parent::setMedia(); if ($this->assignCase == 1) $this->addJS(_THEME_JS_DIR_.'cms.js'); $this->addJS(_THEME_JS_DIR_.'jquery-1.3.2.js'); $this->addJS(_THEME_JS_DIR_.'jquery.galleriffic.js'); $this->addJS(_THEME_JS_DIR_.'jquery.opacityrollover.js'); $this->addCSS(_THEME_CSS_DIR_.'cms.css'); $this->addCSS(_THEME_CSS_DIR_.'galleriffic-2.css'); } However, when entering the cms page content in the BO The code that should be inside this div is being stripped when I save in BO <div id="gallery" class="content"> </div> CODE Being stripped <div id="controls" class="controls"></div> <div class="slideshow-container"> <div id="loading" class="loader"></div> <div id="slideshow" class="slideshow"></div> </div> <div id="caption" class="caption-container"></div> </div> I'm trying here Edited February 21, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Whispar1 Posted February 21, 2013 Author Share Posted February 21, 2013 Perhaps Is there a way to force the div's to not be stripped through the tinymce editor? Link to comment Share on other sites More sharing options...
Whispar1 Posted February 25, 2013 Author Share Posted February 25, 2013 (edited) Update for anyone that runs into this issue: TinyMCE strips empty divs Bug Report http://www.tinymce.c...iew.php?id=5269 GitHub Fix https://github.com/t...16ea1d0f51d6742 This fixed the issue of divs being stripped (as I indicated was happening to me in above post) Even with this, I still can not get my gallery to work. Maybe someone else will get use out of the bug fix. Edited February 25, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Whispar1 Posted February 28, 2013 Author Share Posted February 28, 2013 Bug fix was not a total fix - still buggy. I ended up having to add to empty divs and tweak some competing css files - but all works now - gallery is in place and functioning. Link to comment Share on other sites More sharing options...
Recommended Posts