0

I want to display both full content and teaser content at the same time in node.tpl.php Here is an example of what i want to display

<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
    <li class="active"><a href="#mini" data-toggle="tab">Mini Table</a></li>
    <li><a href="#full" data-toggle="tab">Full Table</a></li>
</ul>
<div id="table-tab" class="tab-content">
    <div class="tab-pane active" id="mini">
        TEASER DISPLAY
    </div>
    <div class="tab-pane" id="full">
        FULL CONTENT DISPLAY
    </div>
</div>

I search for it but didn't find the answers. Please Help

1 Answer 1

1

I think this would be worked for you.

for teaser use

$rendered_teaser = render(node_view(node_load($node->nid), 'teaser'));
print $rendered_teaser;

and for full use

$rendered_full = render(node_view(node_load($node->nid), 'full'));
print $rendered_full;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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