Issue with Custom Template Included with Block
Permalink
I am working on a new block, and I am trying to add a custom template that will be included with it.
The template is intended to be alternate rendering of the same block, so that an alternate jquery, css, and layout is shown instead of the default block.
My issue is that what I have so far causes the Concrete interface to disappear, leaving only a blank toolbar at the top.
What is the proper way to include a template as part of a block package?
I have attached a screenshot of the hierarchy of my block.
The template is intended to be alternate rendering of the same block, so that an alternate jquery, css, and layout is shown instead of the default block.
My issue is that what I have so far causes the Concrete interface to disappear, leaving only a blank toolbar at the top.
What is the proper way to include a template as part of a block package?
I have attached a screenshot of the hierarchy of my block.
![MysteriousCleon](/files/avatars/73006.jpg)
I remember, that some people had similar issue, when including jQuery with some block. You know - jQuery is included in c5, so loading it second time was creating this kind of error.
This block doesn't call in any additional jquery libraries, just a jquery plugin script.
The block, without any template selected, works fine. But, when a template is selected, it causes the issue.
The block, without any template selected, works fine. But, when a template is selected, it causes the issue.
Without seeing your code it's hard to say. The problem you're describing sounds like an issue with your code or markup, not just an issue with your directory structure.
Ok, I just tried re-installing the block (installs / uninstalls fine). However, here is some behavior I noticed (I'm still getting the same result):
- Adding the block as-is to the page works fine with no issues
- When I select the template, I see a hybrid of the original block, and the template version while in edit mode
- The original css and js files from the plain block is still being called in the header while in edit mode
- So, the block seems to partially work - while in edit mode
- Once the page is published, the concrete toolbar goes blank
- It takes refreshing the page (after publish) to see the new (alternate) css and js files for the custom template.
Go to the page and see the source code:
http://c5.gclocal.net/add-ons/social-feed...
- Adding the block as-is to the page works fine with no issues
- When I select the template, I see a hybrid of the original block, and the template version while in edit mode
- The original css and js files from the plain block is still being called in the header while in edit mode
- So, the block seems to partially work - while in edit mode
- Once the page is published, the concrete toolbar goes blank
- It takes refreshing the page (after publish) to see the new (alternate) css and js files for the custom template.
Go to the page and see the source code:
http://c5.gclocal.net/add-ons/social-feed...
Nevermind! Got everything worked out. Turned out I was missing an additional js file that I needed for the block to work.