1

I need access to a specific property of the nodes of articles/post (the text in this case). But I can only access the complete node object and print all the properties, I think I need to access a variable of the node but I don`t know how to nominate this variable loaded of the DB of the web.

The code:

<div id="content"></div>

<?php if (block_get_blocks_by_region('content')): ?>

<?php  print render(block_get_blocks_by_region('content'));
 ?>
<?php endif; ?>

<?php 
$type = "article"; 
$nodes = node_load_multiple(array(), array('type' => $type)); 
foreach($nodes as $articles):
?>
<?php print $articles->nid; ?>
<?php print $articles->title; ?>
<?php print $articles->page; ?>
<?php print $articles->safe_value; ?>
<?php print_r($node)?>
<?php
$nid = $articles->nid;
$node = node_load($nid);
$node_tpl_output = node_view($node); ?>
<div class="sep intro" data-stellar-background-ratio="0.5"></div>
<?php endforeach; ?>

I try put to print for any article/post a specific footer or info.

Thanks for all

  • Welcome to Drupal Answers! Your question ("the name of the complete text (only the text) like title or nid") is not clear and it doesn't have sense. Please edit the question to make it clearer. – kiamlaluno Apr 24 '15 at 11:03
  • tank you kiamlaluno! I re-write the post. have a nice day – Ramos Apr 27 '15 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.