hallo leutz,
mal wieder ne simple frage für zwischendurch.
ich möchte in der ganz normalen artikelliste:
/**
* Artikelliste mit I1,H1,T1
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* INPUT
*
* Author Jan Lengowski
* Copyright four for business AG
*/
den startartikel ausblenden. also ich habe als startartikel quasi die artikelliste (übersicht), die weiteren artikel werden in der artikelliste angezeigt. jetzt wird der startartikel auch angezeigt...der soll aber ausgeblendet werden. da gab es doch mal ne lösung..oder?
merci + gruß,
nico
Artikelliste - Startartikel in Liste ausblenden!
Hallo Ilaron,
schau mal ob Du in Deinem Modul-Code die Zeile
findest... damit ist der Startartikel ausgeschaltet... Wenn Du den Startartikel anzeigen willst musst Du da
stehen haben...
Mehr Infos findest Du unter
http://contenido.org/forum/viewtopic.php?t=2087
Ich hoffe es hilft Dir ein wenig weiter....
Gruß
Jörg
schau mal ob Du in Deinem Modul-Code die Zeile
Code: Alles auswählen
"start"=>false;
Code: Alles auswählen
"start"=>true;
Mehr Infos findest Du unter
http://contenido.org/forum/viewtopic.php?t=2087
Ich hoffe es hilft Dir ein wenig weiter....
Gruß
Jörg
Jörg Zimmermann
Köln Rondorf
Köln Rondorf
hallo,
danke, aber den punkt finde ich nirgends im code!
anbei der originalcode, evtl. kann mir hier direkt jmnd. weiterhelfen:
eingabe:
ausgabe:
danke + gruß,
Nico
danke, aber den punkt finde ich nirgends im code!
anbei der originalcode, evtl. kann mir hier direkt jmnd. weiterhelfen:
eingabe:
Code: Alles auswählen
/**
* Artikelliste mit I1,H1,T1
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* INPUT
*
* Author Jan Lengowski
* Copyright four for business AG
*/
// selected category
$selected = "CMS_VALUE[0]";
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr valign=\"top\">
<td>Kategorie wählen:</td>
<td>
<select name=\"CMS_VAR[0]\">";
if($selected!="0" && $selected!=""){
echo"<option value=\"0\">--- kein ---</option>";
}else{
echo"<option selected=\"selected\" value=\"0\">--- kein ---</option>";
}
// fetch all categorys
$query = "SELECT A.idcat, A.level, C.name FROM ".$cfg["tab"]["cat_tree"]." AS A, ".
$cfg["tab"]["cat"]." AS B, ".$cfg["tab"]["cat_lang"]." AS C WHERE A.idcat=B.idcat ".
"AND B.idcat=C.idcat AND C.idlang='$lang' AND B.idclient='$client' ".
"AND C.visible=1 ORDER BY A.idtree";
// execute query
$db->query($query);
// loop result and build the options
while ($db->next_record()) {
// indent spacer
$spaces = "|";
// how many levels
$levels = $db->f("level");
for ($i = 0; $i < $levels; $i ++) {
// add 2 spaces for every level
$spaces = $spaces . "--";
} // end for
$spaces .= ">";
if ($selected == $db->f("idcat")) {
// selected category
echo "<option selected=\"selected\" value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} else {
// category
echo "<option value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} // end if
} // end while
echo " </select>";
echo " </td>
</tr>
<tr>
<td>Überschrift</td>
<td><input type=\"text\" name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\"></td>
</tr>
<tr>
<td>Angezeigte Länge in Zeichen</td>
<td><input type=\"text\" name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\"></td>
</tr>
</table>";
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* REFERENZ MODUL / ARTIKELLISTE
*
* Artikelliste mit Img 1, Head 1, Head 2
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* Author : Jan Lengowski
* Copyright : four for business AG
* Created : 15-08-2002
* Modified : 16-08-2002
************************************************/
// second db class instance
$db2 = new DB_Contenido;
// selected category
$selcat = "CMS_VALUE[0]";
if($selcat!="0" && $selcat!=""){
// select all articles in category widthout start article
$query = "SELECT ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".
$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
"ARTLANG.online = '1' ORDER BY ARTLANG.lastmodified DESC";
// execute query
$db->query($query);
unset($articleID);
unset($linkID);
// get id's of sub articles
while ($db->next_record()) {
$articleID[] = $db->f("idartlang");
$linkID[] = $db->f("idart");
} // end while
// loop through subarticles
echo '
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="left" class="subheadline">CMS_VALUE[2]</td></tr>
';
if (is_array($articleID)) {
foreach ($articleID as $key => $value) {
// select all CMS variables of the article
$sql = "SELECT * FROM ".$cfg["tab"]["content"]." WHERE idartlang = '$value' AND idtype = '1' AND typeid = '1'";
$db->query($sql);
$db->next_record();
$head = $db->f("value");
if ( strlen($head) > "CMS_VALUE[3]") {
$head = substr($head, 0, "CMS_VALUE[3]");
$head .= '..';
}
// link
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID[$key]&m=$m&s=$s");
echo '<tr><td colspan="2" class="navigation2" height="15"><a href="'.$link.'">›› '.urldecode($db->f("value")).'</a></td></tr>';
} // end while
unset($headline);
unset($text);
} // end foreach
} // end if (is_array)
echo '</table><br>';
?>
Nico
Hi Nico,
versuch mal folgende Skripte (sind Deine geposteten, nur etwas erweitert)
eingabe:
ausgabe:
schönen Gruß,
Ralph
versuch mal folgende Skripte (sind Deine geposteten, nur etwas erweitert)
eingabe:
Code: Alles auswählen
/**
* Artikelliste mit I1,H1,T1
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* INPUT
*
* Author Jan Lengowski
* Copyright four for business AG
*/
// selected category
$selected = "CMS_VALUE[0]";
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr valign=\"top\">
<td>Kategorie wählen:</td>
<td>
<select name=\"CMS_VAR[0]\">";
if($selected!="0" && $selected!=""){
echo"<option value=\"0\">--- kein ---</option>";
}else{
echo"<option selected=\"selected\" value=\"0\">--- kein ---</option>";
}
// fetch all categorys
$query = "SELECT A.idcat, A.level, C.name FROM ".$cfg["tab"]["cat_tree"]." AS A, ".
$cfg["tab"]["cat"]." AS B, ".$cfg["tab"]["cat_lang"]." AS C WHERE A.idcat=B.idcat ".
"AND B.idcat=C.idcat AND C.idlang='$lang' AND B.idclient='$client' ".
"AND C.visible=1 ORDER BY A.idtree";
// execute query
$db->query($query);
// loop result and build the options
while ($db->next_record()) {
// indent spacer
$spaces = "|";
// how many levels
$levels = $db->f("level");
for ($i = 0; $i < $levels; $i ++) {
// add 2 spaces for every level
$spaces = $spaces . "--";
} // end for
$spaces .= ">";
if ($selected == $db->f("idcat")) {
// selected category
echo "<option selected=\"selected\" value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} else {
// category
echo "<option value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} // end if
} // end while
echo " </select>
</td>
</tr>
<tr>
<td>Überschrift</td>
<td><input type=\"text\" name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\"></td>
</tr>
<tr>
<td>Angezeigte Länge in Zeichen</td>
<td><input type=\"text\" name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\"></td>
</tr>
<tr>
<td>Startartikel anzeigen?</td>
<td><input type=\"checkbox\" value=\"on\"";
if ("CMS_VALUE[4]" != "") { echo " checked";}
echo " name=\"CMS_VAR[4]\"></td>
</tr>
</table>";
ausgabe:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* REFERENZ MODUL / ARTIKELLISTE
*
* Artikelliste mit Img 1, Head 1, Head 2
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* Author : Jan Lengowski
* Copyright : four for business AG
* Created : 15-08-2002
* Modified : 16-08-2002
************************************************/
// second db class instance
$db2 = new DB_Contenido;
// Modifikation:
$startarton = "AND CATART.is_start = '0' AND";
//soll der startartikel mit ausgegeben werden?.
$print_startartikel = "CMS_VALUE[4]";
if($print_startartikel !=""){
$startarton = "AND";
}
// selected category
$selcat = "CMS_VALUE[0]";
if($selcat!="0" && $selcat!=""){
// select all articles in category widthout start article
$query = "SELECT ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".
$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' $startarton ".
"ARTLANG.online = '1' ORDER BY ARTLANG.lastmodified DESC";
// execute query
$db->query($query);
unset($articleID);
unset($linkID);
// get id's of sub articles
while ($db->next_record()) {
$articleID[] = $db->f("idartlang");
$linkID[] = $db->f("idart");
} // end while
// loop through subarticles
echo '
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="left" class="subheadline">CMS_VALUE[2]</td></tr>
';
if (is_array($articleID)) {
foreach ($articleID as $key => $value) {
// select all CMS variables of the article
$sql = "SELECT * FROM ".$cfg["tab"]["content"]." WHERE idartlang = '$value' AND idtype = '1' AND typeid = '1'";
$db->query($sql);
$db->next_record();
$head = $db->f("value");
if ( strlen($head) > "CMS_VALUE[3]") {
$head = substr($head, 0, "CMS_VALUE[3]");
$head .= '..';
}
// link
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID[$key]&m=$m&s=$s");
echo '<tr><td colspan="2" class="navigation2" height="15"><a href="'.$link.'">›› '.urldecode($db->f("value")).'</a></td></tr>';
} // end while
unset($headline);
unset($text);
} // end foreach
} // end if (is_array)
echo '</table><br>';
?>
schönen Gruß,
Ralph