support Archives support

Layout sections 7.3

Prise en compte du layout_section défini au niveau du skin et des options de la page d'index

Avancement0%
WorkflowBesoin d'aide
StatutLe problème a été enregistré

J'ai modifié le script sections/view.php de la manière suivante :

ligne 763 (environ) :

$items = Sections::list_by_title_for_anchor('section:'.$item['id'], $offset, $items_per_page, $item['sections_layout'], $capability);

au lieu de

$items = Sections::list_by_title_for_anchor('section:'.$item['id'], $offset, $items_per_page, $layout, $capability);

Permet de prendre en compte le layout_section défini au niveau du skin;

motif : la variable $layout est initialisée par défaut sur une instance du layout_sections provenant du layout_sections.php, ce qui faisait que le Sections::list_selected() reconnaissait le $layout comme une instance de layout_sections.php et qu'on ne passait pas dans le default du case qui appelle le layout_section du skin.

lignes 773... :

        // actually render the html for the section
        if(@count($box['bar']))
            $box['text'] .= Skin::build_list($box['bar'], 'menu_bar')."\n";
        if(@count($items) && is_string($item['sections_layout']))
            $box['text'] .= Skin::build_list($items, $item['sections_layout']);
        elseif(@count($items))
            $box['text'] .= Skin::build_list($items, '2-columns');
        elseif(is_string($items))
            $box['text'] .= $items;

au lieu de :

        // actually render the html for the section
        if(@count($box['bar']))
            $box['text'] .= Skin::build_list($box['bar'], 'menu_bar')."\n";
        if(@count($items) && ($layout == 'compact'))
            $box['text'] .= Skin::build_list($items, 'compact');
        elseif(@count($items) && ($layout == 'decorated'))
            $box['text'] .= Skin::build_list($items, 'decorated');
        elseif(@count($items))
            $box['text'] .= Skin::build_list($items, '2-columns');
        elseif(is_string($items))
            $box['text'] .= $items;

Permet de tenir compte de l'option indiquée dans "options pour la page d'index" de la section.