Rebuild $content $vars[‘content’] Drupal

That is needed to rebuild the $ content variable in taksomanii,
Link taksomanii was such a
taxonomy/term/1
the output was supposed to get here this html one record

<div class="news-item">
				  <div class="date"><i>04</i>апр</div>
				  <div class="news-block">
					<p class="title"><a href="node/7">программирования с помощью метода эллипсоидов. С самого начала большое внимание будет уделяться связи линейного программирования с теорией целочисленного программирования, комбинаторикой и оптимизацией.
				</p>
					<p class="more"><a "="" href="node/7">Читать далее</a></p>
				  <div class="line"></div>
				</div>
				</div>


Well, as always, long pull, take a tambourine, trayasu him several times in the head comes to mind as razporot DRUPALu intestine,
Take the sword Jedi entitled Nodepad + + open a file template.php (it's located in the folder with the template, if not then create it)
And here we enter a function there

    if (arg(0) == 'taxonomy' && arg(1) == 'term' && arg(2) == '1')
    {
		$month["01"] = "янв";$month["02"] = "фев";$month["03"] = "март";$month["04"] = "апр";$month["05"] = "май";$month["06"] = "июнь";$month["07"] = "июль";$month["08"] ="август";$month["09"] = "сент";$month["10"] = "окт";$month["11"] = "ноя";$month["12"] = "дек";
		if ($title): print '<h1>'. $title .'</h1>'; endif;
			$result = taxonomy_select_nodes(array(arg(2)));
			while ($node = db_fetch_object($result)) {
			  $output .= '
				<div class="news-item">
				  <div class="date">' . date("<\i>d</\i>",$node->created).$month[date("m",$node->created-1)]. '</div>
				  <div class="news-block">
					<p class="title">'.l($node->title, 'node/'.$node->nid).'</p>
					' . node_load($node->nid)->teaser . '
					<p class="more">'.l(t('Read more'), 'node/'.$node->nid).'</p>
				  <div class="line"></div>
				</div>
				</div>
			  ';
			}
			$vars['content'] = $output;
	}}

If a little bit more then here so
This line determines what

if (arg(0) == 'taxonomy' && arg(1) == 'term' && arg(2) == '1')

Seeds that will only handle a specific taksomanii
Next

$result = taxonomy_select_nodes(array(arg(2)));

Choose properties taksomanii, will choose only the title, create, id
but as we get a teaser

node_load($node->nid)->teaser

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.