Project:Job Posting
Version:6.x-1.10
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Is there a way of making the teaser show a summary of the description similar to other node types?

Thanks,

Comments

#1

Within the job_posting.module file update the function template_preprocess_job_posting_node_display() to include the following line:

$variables['summary'] = strip_tags($variables['node']->teaser);

Note: the php function strip_tags() gets rid of any HTML tags - such as <p></p>. It may be you prefer to keep them - in which case omit the strip_tags function as below or use an alternative function to suite your needs.

$variables['summary'] = $variables['node']->teaser;

After which, the auto generated summary/teaser of the body/description becomes available for use within "job-posting-node.tpl.php".

For example the below will display it only on the job listing page.

<?php if (!$page): ?>
  <div class="job-posting-summary">
    <?php print $summary; ?>
  </div>
<?php endif; ?>

I hope this helps.

#2

Status:active» closed (fixed)