obwohl ich eigentlich an anderer stelle arbeiten sollte,
möchte ich das doch nicht so stehen lassen:
ich habe in die navigaton des easyCMS mods eine if - or bedingung hinzugefügt:
Code: Alles auswählen
for( $i = 0; $i < count($parent_chapter_row); $i++ )
{
$parent_chapter_id = $parent_chapter_row[$i]['chapter_id'];
$parent_chapter_name = $parent_chapter_row[$i]['chapter_name'];
if( $is_auth_parents[$parent_chapter_id]['a_view'] )
{
$template->assign_block_vars('chapterrow', array(
'CHAPTER_NAME' => $parent_chapter_name,
'U_VIEW_CHAPTER' => append_sid("portal.$phpEx?aid=$parent_chapter_id")
)
);
if( $article_id == $parent_chapter_row[$i]['chapter_id'] or $article_id == $parent_chapter_row[$i]['chapter_parent_id']) // hab ich eingefügt
{
for( $j = 0; $j < count($child_chapter_row); $j++ )
{
$child_chapter_id = $child_chapter_row[$j]['chapter_id'];
$child_chapter_name = $child_chapter_row[$j]['chapter_name'];
if( $is_auth_children[$child_chapter_id]['a_view'] )
{
if( $child_chapter_row[$j]['chapter_parent_id'] == $parent_chapter_id )
{
$template->assign_block_vars('chapterrow.subchapterrow', array(
'CHAPTER_NAME' => $child_chapter_name,
'U_VIEW_CHAPTER' => append_sid("portal.$phpEx?aid=$child_chapter_id")
)
);
}}}}}}
Code: Alles auswählen
if( $article_id == $parent_chapter_row[$i]['chapter_id']
or $article_id == $parent_chapter_row[$i]['chapter_parent_id'])
die article_id kommt aus der url
die vergleiche ich mit der chapter_id oder der chapter_parent_id
und dann sollten doch in der ausgabe die unterkategorien ausgeklappt werden
das funktioniert leider aber nur bei nem klick auf eine kategorie
bei einem klick auf eine der unterkategorien werden diese wieder eingeklappt
ich wüsste aber nicht, was an dem vergleich mit der chapter_parent_id falsch ist
oder fehlt dafür etwas ??
hier mal der testlink:
http://mona-davinci.de/phpbb/portal.php
nur bands und mackatree haben schon inhalte und funktionieren
kolja