Hi all, please forgive the newbie nature of this question.

I've got a content type ("Testimonial") for which I've made a template ("node--testimonial.tpl.php"). The template is pretty simple:

<?php // node template ?>


<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
  <div class="node-container">

    <div class="nodecontent"<?php print $content_attributes; ?>>

		<span class="pullquote"><?php	print render($content['field_pull_quote']);	?></span>
		<div class="voices-image">
			<?php	print render($content['field_image']);	?>
			<?php	print render($content['field_testimonial_bio']);	?>
		</div>
		<?php	print render($content['body']);	?>
		
	</div>
	
	
  </div><!--end node container-->
</div><!--end node-->  

For some reason, the content in the first-sidebar doesn't display on these testimonial pages. The first-sidebar itself appears to be turned off. Can anyone point me in the direction of where I should look to tell Drupal that the sidebar should be turned on for this content type?

I'm using Drupal 7 and the Marinelli theme. Thanks for any help or advice.

Comments

nevets’s picture

Check the block visibility settings for blocks in the first sidebar. It sounds like the block(s) have restricted visibility.

emyerson’s picture

That's a good thought, but unfortunately, the whole div id="sidebar-first" is missing from these testimonial pages. It's not just that the sidebar blocks aren't displaying; it's that the whole sidebar is missing.

VM’s picture

sidebars are not printed in a node.tpl.php they are printed in a page.tpl.php. Are you overriding the default page.tpl.php file in any way?

emyerson’s picture

I haven't rewritten any code in the default page.tpl.php. Is it possible that a module is somehow interfering? How do you experienced Drupal types go about researching an issue like this in your own work? I've been a PHP guy for years, but a Drupal user only for a few months.

EDIT for spelling

VM’s picture

the easiest way to determine module interference is to switch to an unaltered core theme and test. If the the problem doesn't persist in a core theme than the issue is limited to the theme/file in use. You can also remove the custom tpl.php file. Does normal functionality return? if yes. Then you will need to take the time to compare the default node.tpl.php file with your custom node.tpl.php file.

Also of note, if you are adding tpl.php files and such you should be using a sub-theme of marinelli else you run the risk of losing your changes at the next update of the theme in use.

subtheme creation docs @ https://www.drupal.org/node/225125

emyerson’s picture

Excellent, thank you for your feedback. I'll test as you recommend; hopefully that will help me pinpoint the issue.

emyerson’s picture

I thought I should post a follow up here with my solution, just in case someone Googles this issue years from now and wants to know how it ended.

As it turns out, I was too quick to dismiss the Blocks issue. I looked in the generated HTML and saw that the sidebar wasn't even rendering at all, and took that to mean that something weird was preventing the region from rendering. I knew that a given block was supposed to render on the "First Sidebar" region of every page, so I didn't investigate any further.

The persistent block, as you've already guessed, was NOT actually as persistent as I'd thought. It had specific content types listed on which it was supposed to render, and this new content type was of course not one of them. I activated this new content type for the persistent block and the problem was solved.

Lessons learned:
1. Listen to the advice of people chiming in
2. Be sure you actually know the things you think you know
3. Look to the simple before looking to the complex.

Thanks friends.

jon_stewart’s picture

Feedback is always valuable, and I, for one, remember struggling with Drupal for months!

Jon