<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Magento Expert</title>
	<atom:link href="https://www.the-mage-expert.com/tag/block/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.the-mage-expert.com</link>
	<description>Your Magento Commerce Expert</description>
	<lastBuildDate>Tue, 24 Jan 2023 09:37:24 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Using jQuery and domReady in a static block or CMS page</title>
		<link>https://www.the-mage-expert.com/1227/magento2-using-jquery-domready-static-block-cms-page/</link>
		<comments>https://www.the-mage-expert.com/1227/magento2-using-jquery-domready-static-block-cms-page/#comments</comments>
		<pubDate>Mon, 23 Jan 2023 13:25:55 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Magento 2]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=1227</guid>
		<description><![CDATA[Using jQuery in a Magento 2 static block or CMS page can be tricky, a special syntax is required. Use the following code to add jQuery when all the content was loaded: [crayon-6a7abfa317804/] Of course, you can skip listening to&#8230;]]></description>
				<content:encoded><![CDATA[<p>Using jQuery in a Magento 2 static block or CMS page can be tricky, a special syntax is required. Use the following code to add jQuery when all the content was loaded: </p>
<p></p><pre class="crayon-plain-tag">&lt;script&gt;
    require([
        'jquery'
        ,'domReady!'
    ], function ($) {
         console.log('whatever');
    });
&lt;/script&gt;</pre><p>Of course, you can skip listening to domReady event! Just remove the domReady line, like this:</p><pre class="crayon-plain-tag">&lt;script&gt;
    require([
        'jquery'
    ], function ($) {
         console.log('whatever');
    });
&lt;/script&gt;</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1227/magento2-using-jquery-domready-static-block-cms-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a static block to a CMS page</title>
		<link>https://www.the-mage-expert.com/702/magento-adding-static-block-to-cms-page/</link>
		<comments>https://www.the-mage-expert.com/702/magento-adding-static-block-to-cms-page/#comments</comments>
		<pubDate>Wed, 05 Nov 2014 08:48:47 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[CMS]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=702</guid>
		<description><![CDATA[Use the below code to add a Magento block to your CMS page. [crayon-6a7abfa31ed4a/]]]></description>
				<content:encoded><![CDATA[<p>Use the below code to add a Magento block to your CMS page.</p>
<p></p><pre class="crayon-plain-tag">{{block type=&quot;cms/block&quot; block_id=&quot;block_id&quot;}}</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/702/magento-adding-static-block-to-cms-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing block from cache</title>
		<link>https://www.the-mage-expert.com/683/magento-remove-block-from-cache/</link>
		<comments>https://www.the-mage-expert.com/683/magento-remove-block-from-cache/#comments</comments>
		<pubDate>Wed, 01 Oct 2014 14:05:30 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=683</guid>
		<description><![CDATA[To remove a certain block from the Magento cache, use the below code. [crayon-6a7abfa31f227/]]]></description>
				<content:encoded><![CDATA[<p>To remove a certain block from the Magento cache, use the below code.</p>
<p></p><pre class="crayon-plain-tag">&lt;reference name=&quot;name.of.the.block&quot;&gt;
    &lt;action method=&quot;setCacheLifetime&quot;&gt;&lt;s&gt;null&lt;/s&gt;&lt;/action&gt;
&lt;/reference&gt;</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/683/magento-remove-block-from-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a blocks HTML in a template (phtml)</title>
		<link>https://www.the-mage-expert.com/632/magento-getting-html-of-block-in-template-phtml/</link>
		<comments>https://www.the-mage-expert.com/632/magento-getting-html-of-block-in-template-phtml/#comments</comments>
		<pubDate>Mon, 05 May 2014 08:39:33 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=632</guid>
		<description><![CDATA[The below code shows how to echo the HTML of a block with the id &#8216;my_block&#8217;. [crayon-6a7abfa31f4df/]]]></description>
				<content:encoded><![CDATA[<p>The below code shows how to echo the HTML of a block with the id &#8216;my_block&#8217;.</p>
<p></p><pre class="crayon-plain-tag">echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('my_block')-&gt;toHtml();</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/632/magento-getting-html-of-block-in-template-phtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a static block to the sidebar</title>
		<link>https://www.the-mage-expert.com/465/magento-adding-static-block-to-sidebar/</link>
		<comments>https://www.the-mage-expert.com/465/magento-adding-static-block-to-sidebar/#comments</comments>
		<pubDate>Fri, 27 Sep 2013 14:12:23 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=465</guid>
		<description><![CDATA[Using the folowing layout update, you can add a static block to the left sidebar: [crayon-6a7abfa31f8e1/]]]></description>
				<content:encoded><![CDATA[<p>Using the folowing layout update, you can add a static block to the left sidebar:</p>
<p></p><pre class="crayon-plain-tag">&lt;!-- left --&gt;
&lt;reference name=&quot;left&quot;&gt;
    &lt;block type=&quot;cms/block&quot; name=&quot;STATIC_BLOCK_NAME&quot;&gt;
        &lt;action method=&quot;setBlockId&quot;&gt;&lt;block_id&gt;STATIC_BLOCK_ID&lt;/block_id&gt;&lt;/action&gt;
    &lt;/block&gt;
&lt;/reference&gt;</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/465/magento-adding-static-block-to-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending parameters to a static block</title>
		<link>https://www.the-mage-expert.com/124/magento-sending-parameters-to-static-block/</link>
		<comments>https://www.the-mage-expert.com/124/magento-sending-parameters-to-static-block/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 12:29:15 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[template (phtml)]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=124</guid>
		<description><![CDATA[You have to use so called filters to send parameters to a static block from a template for example. Lets take a look at the following code: Thats the static Magento block: [crayon-6a7abfa31fd3f/] We want to send attributset_name and product_id&#8230;]]></description>
				<content:encoded><![CDATA[<p>You have to use so called filters to send parameters to a static block from a template for example. Lets take a look at the following code: </p>
<p>Thats the static Magento block:</p><pre class="crayon-plain-tag">&lt;a href=&quot;{{store url=''}}{{var attributset_name}}/configuration/test/product_id/{{var product_id}}&quot;&gt;
    konfigurieren
&lt;/a&gt;</pre><p>We want to send attributset_name and product_id dynamically to the block. Add the following code to a template for example:</p>
<p></p><pre class="crayon-plain-tag">$block = $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('block_name');
$variables = array();
$variables['product_id'] = 123;
$variables['attributset_name'] = 'whatever';
                       
$filter = Mage::getModel('core/email_template_filter');
$filter-&gt;setVariables($variables);

// This will now echo the blocks HTML with the values from the passed parameters.
echo $filter-&gt;filter($block-&gt;toHtml());</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/124/magento-sending-parameters-to-static-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using skin, media, &#8230; URLs in blocks or CMS pages</title>
		<link>https://www.the-mage-expert.com/104/magento-skin-media-urls-in-blocks-cms-pages/</link>
		<comments>https://www.the-mage-expert.com/104/magento-skin-media-urls-in-blocks-cms-pages/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 12:19:16 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=104</guid>
		<description><![CDATA[The following 4 examples show how to get the skin, media, base and store URLs in a MAgento block or CMS page: skin: {{skin url=&#8217;images/sampleimage.jpg&#8217;}} media: {{media url=&#8217;/sampleimage.jpg&#8217;}} base: {{base url=&#8217;yourstore/mypage.html&#8217;}} store: {{store url=&#8217;mypage.html&#8217;}}]]></description>
				<content:encoded><![CDATA[<p>The following 4 examples show how to get the skin, media, base and store URLs in a MAgento block or CMS page:</p>
<p>skin: {{skin url=&#8217;images/sampleimage.jpg&#8217;}}<br />
media: {{media url=&#8217;/sampleimage.jpg&#8217;}}<br />
base: {{base url=&#8217;yourstore/mypage.html&#8217;}}<br />
store: {{store url=&#8217;mypage.html&#8217;}}</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/104/magento-skin-media-urls-in-blocks-cms-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
