1

I am using the Popup module. I want to display a particular block content in popup. So I used this module. it's working good except in my custom front page (page--front.tpl.php).I don't know why. My custom front page full of HTML. Can anyone help me?

  • Hello and welcome. If this is a bugreport for opoup module, it is off-topic here. If you think that module is OK, and the problem is within your code in page--front.tpl.php, please share that code. We can't help with what we can't see. Visit Help Center for details :) – Mołot Sep 18 '14 at 12:37
  • this is my file link filedropper.com/page--fronttpl. chk this – Guna Sep 18 '14 at 12:47
  • 1
    Edit code into the question, please. Link does not work. And even if you will make it work, it may fail some time in future, without warning. – Mołot Sep 18 '14 at 12:55
0

Try this, this may help you.

Below code is for Popup

    <div id="dialog" title="Complete Profile"> 
  <p><?php
  if($current_percent < 60) {
    print t('Your profile should be atleast 60% completed. Please continue to fill !empty-field', array('!empty-field' => l($nextfield_title, $next_path), '!complete' => $next_percent));
       }
?></p>
</div> 

Below is JS

    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
  <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
  <link rel="stylesheet" href="#">
  <script>
  $(function() {
    var current_percent='<?php echo $current_percent;?>';
    if(current_percent  < 60){
    $( "#dialog" ).dialog();
}
  });
  </script>
  <style>
.ui-dialog,.ui-dialog,.ui-widget, .ui-widget-content, .ui-corner-all, .foo, .ui-draggable, .ui-resizable {background:#846330 !important}‚Äč
  </style>
  • Hi samzha, it's working. but i want "clike here", if i click this content, then only popup should be open, but now normally popup opened – Guna Sep 18 '14 at 13:00
  • ok may u pls clarify at what condition you want to generate popup... Through above code popup generate with page loading @Guna – Nishant Sep 18 '14 at 13:03
  • This is custom region code. Products is a region name. under this region i added one block. So i want the particular block content in popup. this is the function. <?php print render(block_get_blocks_by_region('products')); ?> This function returns content of block. i want this content in popup – Guna Sep 18 '14 at 13:10
  • print render(block_get_blocks_by_region('products')); This function returns content of block. i want this content in popup.Ex: click here, if i click this content will open in popup – Guna Sep 18 '14 at 13:12
  • okk now I understand... I have update my above code.. In above code, if % of profile is less than 60% then popup is shown otherwise no popup. I have add condition you may check where am I add. You can add your condition there. – Nishant Sep 18 '14 at 13:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.