わかりました、これはおそらくばかげた質問ですが、とにかくそこに出そうと思いました:
単純な問題に対する奇妙な解決策であることは知っていますが、分類ページのノードのリストを制御する必要がありました。私が伝統的な方法を手に入れたとは感じませんでした。そこで、タクソノミーに基づいてノードをフェッチするモジュール (taxonomy_select_nodes()) を作成し、それに合わせてページャーを使用したいと考えました。
コードは次のとおりです。
function theModule_recipeList(){
$path = drupal_get_path_alias($_GET['q']);
$args = explode("/",$path);
$themePath = drupal_get_path("theme", "theTheme");
$term = taxonomy_get_term_by_name($args[1]);
$tid = $term[0]->tid;
$nodes = taxonomy_select_nodes(array($tid));
$output = "<div id='recipeListWrapper'>";
while($row = db_fetch_object($nodes)){
$node = node_load($row->nid);
if($node->uid != 1){
$userClass="user";
}
else{
$userClass="admin";
}
$output .= "
<div class='receptThumbnailWrapper'>
<div class='wrapper'>
<img src='".base_path().$themePath."/graphics/recept-default-small.png' />
<h3><a href='".base_path() . $node->path."'>".$node->title."</a></h3>
<div class='recipeType $userClass'></div>
</div>
</div>
";
}
$output .= "</div>";
return $output;
}
現在、モジュールは私が計画したとおりに機能し (ダクトテープのようなソリューションですが、私は知っています)、ポケットベルは印刷して機能します。問題は、ポケットベルが何よりも先に印刷されることです。
$output が返される前に taxonomy_select_nodes を呼び出すためだと思われますが、必要なノードを取得するために必要です。
どうぞ、どんな提案でも大歓迎です。
/アンダース