Sidebar Bug

carso's picture
carso
Sun, 04/26/2015 - 02:49
#1
Sidebar Bug

Sorry again. 

I create a new content type "demo" and add elements on the sidebar of this content "demo/*", but no elements are showed. The sidebar is not printed. I tried with other sections and work fine then my rule "demo/*" is correct. (I'm using the defaul node.tpl.php for the new content type.


This code in page.tpl.php is the problem I gues...

<?php if(isset($node)) : ?>
 <?php if($node->type == 'events' || $node->type == 'team' || $node->type == 'blog') : ?>
            <section class="light_section blog <?php print theme_get_setting('sidebar_position','md_meriada'); ?>-sidebar <?php ($node->type == 'blog') ? print 'blog-single' : print ''; ?>">
              <div class="container">
                  <div class="row">
                      <?php if ($page['sidebar']) : ?>
                          <!-- main content -->
                          <?php if(theme_get_setting('sidebar_position','md_meriada') != 'no') : ?>
                          <div class="col-sm-8 col-md-8 col-lg-9 <?php (theme_get_setting('sidebar_position','md_meriada') == 'left') ? print 'col-sm-push-4 col-md-push-4 col-lg-push-3' : print ''; ?>">
                          <?php else : ?>
                          <?php if($node->type == 'blog') : ?>
 <div class="col-sm-10 col-sm-push-1">
                          <?php else : ?>
                          <div class="col-sm-12">
                          <?php endif;?>
 <?php endif; ?>
                              <?php print render($tabs); ?>
 <?php print render($page['content']); ?>
                          </div>
                          <!--eof col-sm-9 (main content)-->
                          <?php if(theme_get_setting('sidebar_position','md_meriada') != 'no') : ?>
                              <!-- Sidebar -->
                              <aside class="col-sm-4 col-md-4 col-lg-3 <?php (theme_get_setting('sidebar_position','md_meriada') == 'left') ? print 'col-sm-pull-8 col-md-8 col-lg-pull-9' : print ''; ?>">
                                  <?php print render($page['sidebar']); ?>
                              </aside>
                              <!-- eof sidebar -->
                          <?php endif; ?>
                      <?php else : ?>
                          <?php if($node->type == 'blog') : ?>
 <div class="col-sm-10 col-sm-push-1">
<?php print render($tabs); ?>
<?php print render($page['content']); ?>
                            </div>
                          <?php else : ?>
                          <?php print render($tabs); ?>
                          <?php print render($page['content']); ?>
                          <?php endif;?>
                      <?php endif; ?>
                  </div>
              </div>
          </section>

To fix this I add my "new_node" in every instance but this is not the best solution. Could you correct the code . 

<?php if($node->type == 'events' || $node->type == 'team' || $node->type == 'blog' || $node->type == 'new_node') : ?>

cindy's picture
cindy
Mon, 04/27/2015 - 00:02

Hi,

Please send us your site url, admin account and FTP account to [email protected] (also this forum link)

dgprints's picture
dgprints
Thu, 05/21/2015 - 19:32

Same problem

phuonght's picture
phuonght
Thu, 05/21/2015 - 22:16

Hi,

Could you send us your site url, admin account and FTP account (forum link as well) via email: [email protected]?

We would like to check it for you.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.