Slideshow custom template JS not loading when in Stack Modal

Permalink Browser Info Environment
Hi There,

I have a custom template for the built-in slideshow block that works when the slideshow is placed into a stack - then placed on a page.

But when I try to use the stack with Stack Model, the JS in the custom template's JS directory won't load - Is there a way to force it to load?

I'd prefer c5 loaded it with the rest of the c5 JS over loading it manually in the page wherever Stack Modal is inserted - if that makes sense.

Any help would be much appreciated.

Cheers

Type: Discussion
Status: New
cmscss
View Replies:
glockops replied on at Permalink Reply
glockops
This is a problem that is also in the core. The stack display function fails to pick up the related files that are part of the stack.

I haven't looked into this particular "bug" in awhile, so perhaps there is a work around that I am unaware of. I'll look into it further and see if there are any options for including those files.

Thanks,
~ Daniel
cmscss replied on at Permalink Reply
cmscss
Thanks heaps mate - I'm now trying a slightly different tack to get around the issue but am struggling with creating a Stack Modal custom template.

Firstly, I have a minimal test page setup that contains all the markup, js and css loading the same way c5 is loading everything.

Secondly, I'm testing the custom template with a standard content block stack and text trigger.

The custom template is injecting all the correct markup and js dependancies but seems to be stopping the JS inserting a mask div required to make the overlay function.

The only thing I can see that's different from my static test page, is that the Stack Modal version is also loading some bootstrap js - is there a way to get the custom template to stop Stack Modal loading this file?

Just so I can test and rule this out.
cmscss replied on at Permalink Reply
cmscss
I also notice Stack Modal is loading a full version of bootstrap.min.css

Is there a way to stop this from loading as well?
cmscss replied on at Permalink Reply
cmscss
OK, please ignore posts above re CSS and JS - I deleted all content but it didn't fix the main issue.

Is there trick to getting Stack Modal custom templates working?

Just to recap, something with c5 or Stack modal is stopping a jquery-tools js file from inserting an overlay mask div.
glockops replied on at Permalink Reply
glockops
If you insert your stack containing the block with its custom template
applied using the "Add Stack to Area" feature built into concrete5, does
your custom template CSS/JS get inserted?

That was the problem I was running into.
I'll look into reducing bootstrap, I thought I included an "only-needed"
version...

Thanks,
~ Daniel

On Monday, July 30, 2012, concrete5 Community wrote:
cmscss replied on at Permalink Reply
cmscss
If you insert your stack containing the block with its custom template
applied using the "Add Stack to Area" feature built into concrete5, does
your custom template CSS/JS get inserted?


Correct - just the "Add Stack" option from the menu right? There is an issue when you try to embed a stack in a template I think - as far as I can tell from the forums anyway.

But the issue I'm having now isn't to do with a custom template in a stack. It's to do with a custom template for Stack Modal - a custom overlay.

I'll look into reducing bootstrap, I thought I included an "only-needed"


Actually, you did - my bad. The included CSS is only the modal stuff, but it's still loading a bunch of unnecessary stuff if you know what I mean?

Is there a way for Stack Modal to only load the dependancies referenced in the custom template - or is this a c5 core issue?
cmscss replied on at Permalink Reply
cmscss
I might've misunderstood your answer sorry.

I have an intermittent issue with the c5 dashboard disappearing when using custom templates and adding a new instance of the Stack Model block - I thought it was because of a rogue rel="" attribute but I'm now experiencing the issue on two different sites with modal templates based on two different frameworks - jQuery Tools and Zurb Foundation.

I'm always adding the stacks, blocks and custom templates via the c5 dashboard - are you saying there's a c5 bug with custom templates in Stacks in general? Or only when adding blocks programmatically in templates?

The solution after adding the Stack Modal Block, is to:
- Remove the custom template directories for both Stack Modal and the block (in this case, the Slideshow block)
- Refresh the browser
- Put the custom directories back
- Refresh the browser again

Then the c5 dashboard works - as do the modals - but this obviously isn't a client-friendly solution.

Sorry for all the posts - I'm just trying to track down the source of the issue as your block solves a whole bunch of content management issues for our clients and I don't have much jQuery/javascript troubleshooting experience.

Any help would be much appreciated.

Cheers

Ben
cmscss replied on at Permalink Reply
cmscss
[Removed - issue is back as noted above]
cmscss replied on at Permalink Reply
cmscss
[Removed - issue is back as noted above]

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.