Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

How set dynamic block by layout
(1 viewing) (1) Guest
Support forum for users using free edition of M-Turbo. These forums are for mutual help among users.

NOTE: Due to our capacity limitations, ARTIO does not monitor this forum category regularly. If you want direct support from ARTIO, please start a ticket at Support Dashboard. If you have no support ticket available, you need to purchase it.
  • Page:
  • 1

TOPIC: How set dynamic block by layout

How set dynamic block by layout 11 years, 8 months ago #36909

Hello,

I'm desperately trying to exclude from cache a block but it seems impossible. What do I have to write into the Dynami Blocks textarea?

My configuration is the following:

 
// local.xml
<reference name="bottomContent">
<block type="mycompany_newsletterpopup/popup" output="toHtml" name="newsletter.popup" as="newsletter.popup" after="all" template="mycompany/newsletter_popup_loader.phtml" />
</reference>
 


the inclusion works well when mturbo is not active, but when I switch it on it keeps caching the block.

In the textarea I wrote Mycompany_NewsletterPopup_Block_Popup but it has no effect.

Could you please helkp me?

Thanks

Re: How set dynamic block by layout 11 years, 8 months ago #36929

  • jich
  • OFFLINE
  • Posts: 254
You have to use name in layout, not type. Try newsletter.popup instead of Mycompany_NewsletterPopup_Block_Popup. Don't forgett refresh cached pages after saving this settings.
ARTIO Support Team

Re: How set dynamic block by layout 11 years, 8 months ago #36931

Helo,

thank you for your answer.

I tryed your solution but unfortunately it doesn't work.

I post the content of the block, maybe it can help you

 
<a id="autoBox" href="/newsletter-popup"></a>
 
<script type="text/javascript">
 
jQuery(document).ready(function() {
jQuery("#autoBox").fancybox({'type': 'iframe', width:500, height:520});
<?php if (!Mage::getModel('core/cookie')->get('newsletter')): ?>
<?php Mage::getModel('core/cookie')->set('newsletter', 1, 3600*24*30); ?>
jQuery("#autoBox").trigger('click');
<?php endif; ?>
});
</script>
 


Thank you

Re: How set dynamic block by layout 11 years, 8 months ago #36955

  • jich
  • OFFLINE
  • Posts: 254
Hi,

HTML code is not important for this purpose. Try to get url YOUR_SITE/mturbofrontend?identifier[]=newsletter.popup. You should see HTML of your newsletter block.
ARTIO Support Team

Re: How set dynamic block by layout 11 years, 7 months ago #37511

No way to get it work. The link you suggested doesn't output my block.

 
IndexController.php line 72
$node = $layout->getXpath("//block[@name='".$identifier."']/parent::*");
 


doesn't load my block

Re: How set dynamic block by layout 11 years, 7 months ago #37526

  • jich
  • OFFLINE
  • Posts: 254
Are you sure that file local.xml is loaded and that block "newsletter.popup" is defined in <default> handle?
ARTIO Support Team
  • Page:
  • 1
User Login Empty