<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using template inheritance, is it possible to use Splunk framework Django tags within a child template? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Using-template-inheritance-is-it-possible-to-use-Splunk/m-p/110427#M1116</link>
    <description>&lt;P&gt;I'm trying to use template inheritance to reuse framework code in other apps. When i attempt to pull out parts into parent and child pages, my child page is erroring on the fact that i have a django tag being used.&lt;/P&gt;

&lt;P&gt;"Invalid block tag: 'dropdown', expected 'endblock'"&lt;/P&gt;

&lt;P&gt;Is it not possible to use splunk framework django tags within a child template?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Sep 2014 00:07:33 GMT</pubDate>
    <dc:creator>grossb</dc:creator>
    <dc:date>2014-09-04T00:07:33Z</dc:date>
    <item>
      <title>Using template inheritance, is it possible to use Splunk framework Django tags within a child template?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Using-template-inheritance-is-it-possible-to-use-Splunk/m-p/110427#M1116</link>
      <description>&lt;P&gt;I'm trying to use template inheritance to reuse framework code in other apps. When i attempt to pull out parts into parent and child pages, my child page is erroring on the fact that i have a django tag being used.&lt;/P&gt;

&lt;P&gt;"Invalid block tag: 'dropdown', expected 'endblock'"&lt;/P&gt;

&lt;P&gt;Is it not possible to use splunk framework django tags within a child template?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2014 00:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Using-template-inheritance-is-it-possible-to-use-Splunk/m-p/110427#M1116</guid>
      <dc:creator>grossb</dc:creator>
      <dc:date>2014-09-04T00:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using template inheritance, is it possible to use Splunk framework Django tags within a child template?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Using-template-inheritance-is-it-possible-to-use-Splunk/m-p/110428#M1117</link>
      <description>&lt;P&gt;Alright, so this has been resolved. The answer is yes, template inheritance does worked within splunk apps and the problem i was creating was not defining my parent content blocks that i defined in my child template. &lt;/P&gt;

&lt;P&gt;For example.&lt;BR /&gt;
In the child.html tempate, i defined a content block called:&lt;BR /&gt;
{% block my_custom_div %}&lt;BR /&gt;
{% endblock my_custom_div %}&lt;/P&gt;

&lt;P&gt;But neglected to include that block within a defined block in the parent.html&lt;BR /&gt;
Previous broken template:&lt;BR /&gt;
{% block my_div %}&lt;BR /&gt;
{% endblock my_div %}&lt;/P&gt;

&lt;P&gt;But since this name was not previously defined in my parent, it didn't know how/what to do with it. But adding this block within a previously defined parent block, like:&lt;BR /&gt;
{% block content %}&lt;BR /&gt;
    {% block my_div %}&lt;BR /&gt;
    {% endblock my_div %}&lt;BR /&gt;
{% endblock content %}&lt;/P&gt;

&lt;P&gt;It will render.&lt;BR /&gt;
The error specifically calling out the django block tag was because in the template (the child in this case) did not include the "{% load splunkmvc %}" block at the top which is used to make the django dropdown block.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Using-template-inheritance-is-it-possible-to-use-Splunk/m-p/110428#M1117</guid>
      <dc:creator>grossb</dc:creator>
      <dc:date>2020-09-28T17:35:10Z</dc:date>
    </item>
  </channel>
</rss>

