Tema: Drupal klausimas
Autorius: useris
Data: 2013-06-29 00:37:37
Sveiki,

su drupal pirma karta susiduriu ir neismanau jo veikimo. Tema rodo viena 
"posta" puslapyje, kaip suprantu, drupale jis vadinasi "node". Noriu, kad 
rodytu kelis puslapyje, ar random ar is eiles, nera kolkas esmes. Kodas 
mazdaug toks, kur pratryniau sudejau "......". Nesuprantu is kur ta 
kintamaji "node" istraukia, jo man nei echo nei print reiksmes neismeta, 
erroras. Jei koda antra karta ipastinu failo gale, ta pati posta du kartus 
pakartoja, taigi kaip ideti kita posta? :)


<?php

/**
 * @file
 * Default theme implementation to display a node.
 *
 * Available variables:
 * - $title: the (sanitized) title of the node.
.......
 *

// Entity metadata wrapper for the node
$wrapper = entity_metadata_wrapper('node', $node);

Tikiuosi nieko svarbaus neistryniau, o toliau jau eina pacio psl "piesimas":


.....


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

  <?php print $user_picture; ?>

  <?php print render($title_prefix); ?>
  <h2 id="nodedealtitle"<?php print $title_attributes; ?>><a href="<?php 
print $node_url; ?>"><?php print $title; ?></a></h2>
  <?php print render($title_suffix); ?>

  <?php if ($display_submitted): ?>
  <div class="submitted">
    <?php print $submitted; ?>
  </div>
  <?php endif; ?>
.............
  </div>
</div>
  <div class="wrapper"></div>
  <div id="stores" class="nodeboxnormal nodeboxnormaltwocol">
    <div class="boxmid nodedealdata">
      <div class="nodeboxnormalright">
        <div class="storecontact">
          <?php print 
render($content['field_store_refer'][0]['field_store_image']);?>
          <h2 class="nodeheadline"><?php echo 
$wrapper->field_store_refer->title->value(); ?></h2>
          <?php print 
render($content['field_store_refer'][0]['field_store_location']); ?>
          <a href="<?php print 
render($content['field_store_refer'][0]['field_store_site'][0]['#markup']); 
?>"><?php print 
render($content['field_store_refer'][0]['field_store_site'][0]['#markup']); 
?></a>
        </div>
      </div>
      <div class="nodeboxnormalleft">
        <h3 class="nodeheadline"><?php print $title; ?></h3>
        <?php echo 
($content['field_store_refer'][0]['body']['#items'][0]['value']);?>
      </div>
      <div class="wrapper"></div>
    </div>
    <div class="wrapper"></div>
  </div>

failo pabaiga.