snipt

Ctrl+h for KB shortcuts

PHP

Inject data into a module position

1
2
3
4
5
<?php
// Inject data from your component into the right module position
JFactory::getDocument()->setBuffer($data, 'modules', 'right');

// Note: Data will not be shown unless there are "real" modules present in position right
https://snipt.net/embed/130d081d59867fbbba5a542407fc5b69/
https://snipt.net/raw/130d081d59867fbbba5a542407fc5b69/
130d081d59867fbbba5a542407fc5b69
php
PHP
5
2016-09-26T00:56:58
True
False
False
Apr 01, 2014 at 11:55 AM
/api/public/snipt/126514/
inject-data-into-a-module-position-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">// Inject data from your component into the right module position</span> </span><span id="L-3"><a name="L-3"></a><span class="nx">JFactory</span><span class="o">::</span><span class="na">getDocument</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">setBuffer</span><span class="p">(</span><span class="nv">$data</span><span class="p">,</span> <span class="s1">&#39;modules&#39;</span><span class="p">,</span> <span class="s1">&#39;right&#39;</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="c1">// Note: Data will not be shown unless there are &quot;real&quot; modules present in position right</span> </span></pre></div> </td></tr></table>
joomla, module, position

Text only

Prestashop Module For Advance SEO


https://snipt.net/embed/7b5dfa1893921b646b57ba4552d5d269/
https://snipt.net/raw/7b5dfa1893921b646b57ba4552d5d269/
7b5dfa1893921b646b57ba4552d5d269
text
Text only
1
2016-09-26T05:38:50
True
False
False
Aug 14, 2013 at 01:34 AM
/api/public/snipt/74058/
prestashop-module-for-advance-seo
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a> </span></pre></div> </td></tr></table>
"Prestashop seo", module

PHP

Module position count

1
2
3
4
5
<?php if ($this->countModules( 'position' )) : ?>
  <div>
    <jdoc:include type="modules" name="position" />
  </div>
<?php endif; ?>
https://snipt.net/embed/fb456f32b8fe58fb96fbd70db002da6e/
https://snipt.net/raw/fb456f32b8fe58fb96fbd70db002da6e/
fb456f32b8fe58fb96fbd70db002da6e
php
PHP
5
2016-09-26T09:55:20
True
False
False
Sep 25, 2013 at 02:25 PM
/api/public/snipt/67730/
module-position-count
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nv">$this</span><span class="o">-&gt;</span><span class="na">countModules</span><span class="p">(</span> <span class="s1">&#39;position&#39;</span> <span class="p">))</span> <span class="o">:</span> <span class="cp">?&gt;</span><span class="x"></span> </span><span id="L-2"><a name="L-2"></a><span class="x"> &lt;div&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="x"> &lt;jdoc:include type=&quot;modules&quot; name=&quot;position&quot; /&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="x"> &lt;/div&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="cp">&lt;?php</span> <span class="k">endif</span><span class="p">;</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
count, joomla, module, position, template
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.