Download & Extend

Can't hide page content

Project:AdaptiveTheme
Version:7.x-3.1
Component:CSS/HTML
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've got a page--front.tpl.php and have a custom content type and on this template page I need to layout the fields on certain parts of the page eg:

          <!-- region: Main Content -->
          <?php if ($content = render($page['content'])): ?>
            <div id="content" class="region">

              <?php hide($content['field_questions']); ?>
              <?php hide($content); ?>
          
            <div class="customClass">
              <?php print render($content['field_questions']);   ?> 
            </div>
            </div>
          <?php endif; ?>

The field_questions does not get output to the page even though it has a value and my page looses it's style. If I leave it as print $content then renders the page the default style. Can I not use hide within this part of the template (using a subtheme)?

Comments

#1

Status:active» fixed

Not sure whether the variables were in scope but I've solved my problem by creating a template for that node and I can now render specific fields.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.