Hallo
ich habe mir mal den Conten Block zur brust genommen und wollte das nur ein bestimmter Conten im Block angezeigt wird! Nur erscheinen bei mir alle geschrieben Contents im Block woran liegt habe das Linit rausgenommen und auf des Spezielle Content verlinkt.
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
global $prefix;
$result = sql_query("SELECT pid, page_header, title, text FROM ".$prefix."_pages WHERE active='1'");
while(list($pid ,$page_header, $title ,$text) = sql_fetch_row($result)) {
$content .= '
<div style="text-indent: -8px; margin-left: 8px;">
<strong></strong> <a href="modules.php?name=Content&pa=showpage&pid=3">'.$title.'</a>
<strong></strong> <a href="modules.php?name=Content&pa=showpage&pid=3">'.$page_header.'</a>
<strong></strong> <a href="modules.php?name=Content&pa=showpage&pid=3">'.$text.'</a>
</div>';
}
Ich möchte vom 3 Content nur die Überschrift dern Header und den Text in einem Block angezeigt haben!
Hallo, habe mich nochmal dran gemacht bekomme es aber nicht hin das nur der inhal von einen Conten Beitrag in einen block angezeigt wird.
wie bekomme ich es hin das nur der inhalt aus modules.php?name=Content&pa=showpage&pid=3 in einem block angezeigt wird?
Hallo !
Dies hier :
Zitat$result = sql_query("SELECT pid, page_header, title, text FROM ".$prefix."_pages WHERE active='1'");
while(list($pid ,$page_header, $title ,$text) = sql_fetch_row($result)) {
Lädt ALLE Pages die im Content vorhanden sind.
Diese werden dann jeweils in einem DIV-Conteiner ausgegeben.
Wenn Du nur einen bestimmten Content im Block haben möchtest , machst Du das so :
$result = sql_query("SELECT pid, page_header, title, text FROM ".$prefix."_pages WHERE pid=3");
while(list($pid, $page_header, $title, $text ) = sql_fetch_row($result)) {
$content .= '
<div style="text-indent: -8px; margin-left: 8px;">
<strong><big>·</big></strong> <a href="modules.php?name='.$module_name.'&pa=showpage&pid='.$pid.'">'.$title.'</a>
<strong><big>·</big></strong> '.$page_header.'
<strong><big>·</big></strong> '.$title.'
<strong><big>·</big></strong> '.$text.'
</div>';
}Nur als ganz vereinfachtes Beispiel !
MfG
jubilee
Jo Danke , das hat mir sehr geholfen
Hallo,
das hat mir auch geholfen... allerdings wollte ich eine spezielle Category angezeigt bekommen.... das geht dann mit ...where (a.cid=3) AND (..) ... usw. (ich benutze den Block "gg" http://www.pragmamx.net/forum-topic-16022.0.html (http://www.pragmamx.net/forum-topic-16022.0.html)
Allerdings hab ich da noch eine Frage: Wie bekomme ich das hin, das nur die 10 neuesten Inhalte/Content angezeigt werden?