Jump to content

[Solved] Help Adding Gallery To Custom Cms Page


Recommended Posts

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 by Whispar1 (see edit history)
Link to comment
Share on other sites

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 by Whispar1 (see edit history)
Link to comment
Share on other sites

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 by Whispar1 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...