Using template tags is there a way to add a feature content slider into a custom-template?
For example, if I want one half-way down the "home" page, to add the feature content slider in there, using a set of {{ }} or { } ?
Thanks.
Official response from Taylor Pineiro
Please see below for help!
Share this post
Showing 6 reactions
Sign in with
Therefore, the header image will not show up if you have featured content slider images. Thus you should change that line to this: {% if site.has_header_image? %}
Thanks for your help. ( I tried the link Jerimee supplied but it said page not found.)
Certified Architect
Certified Developer
This is partial contents of my modified _columns_2.html theme file <em>(may not be appropriate for production sites)</em>:
<pre>
<div class=“twocolumn_container”> <!— left column begins —> <div class=“left_column”>
{% case page.id }
{ when 19 }
<p>features used to be here, but no longer due to custom _columns_2.html</p>
{ else }
{ include “features” }
{ endcase %} {{ content_for_notifications }} <div class=“content_{{ request.template }}”> {% yield %} </div> </div> <!— left column ends —> <!— right column begins —> <div class=“right_column”> {% case page.id %} {% when 19 %} {% include “features” %} {% else %} {% comment } nothing { endcomment %} {% endcase %}
</pre>
Certified Architect
Certified Developer
this may also not work, feel free to just email me at [email protected]
<pre>
{% case page.id }
{ when 17 }
<h4> columns_1.html</h4>
<div class=“columns_1_flash”>{{ content_for_notifications }}</div>
<div class="content{{ request.template }}">
{ yield }
</div>
{ include “features” }
{ else }
{ include “features” %} <div class=“columns_1_flash”>{{ content_for_notifications }}</div> <div class=“content_{{ request.template }}”> {% yield %} </div>
{% endcase %}
</pre>
Certified Architect
Certified Developer
<a href=“”http://richir.nationbuilder.com/sliders_at_bottom_of_page">http://richir.nationbuilder.com/sliders_at_bottom_of_page" title=“nationbuilder custom tpl example”>http://richir.nationbuilder.com/sliders_at_bottom_of_page</a>
It’s not so tough, but you will need to willing to recode your templates with some logic unless you want to move the featured sliders on /every/ page where they exist.
Here is the code I used (may not be appropriate for production sites):
{% case page.id }
{ when 17 }
<h4> columns_1.html</h4>
<div class=“columns_1_flash”>{{ content_for_notifications }}</div>
<div class="content{{ request.template }}">
{ yield }
</div>
{ include “features” }
{ else }
{ include “features” %} <div class=“columns_1_flash”>{{ content_for_notifications }}</div> <div class=“content_{{ request.template }}”> {% yield %} </div>
{% endcase %}
My example page doesn’t have a sidebar, so this code is in the _columns_1.html template file. You will need to swap “17” with the page.id of the page you want to make the change to.
Send me an email at [email protected] and I will send you some better instructions, or you can hire us to knock this out for you real quick.
Hope this helps.