Vytvoření pokročilé Fotogalerie v Drupalu - Views Views Máme tři pohledy: gallery_photos, all_galeries, admin_gallery Buď je můžete vytvořit podle návodu níže, nebo importovat z přiložených txt souborů (nezadávat název ručně). View: gallery_photos Full gallery slouží k zobrazení náhledů fotek v galerii. Latest image teaser zobrazuje jeden obrázek náhled ve výpisu galerií. Block latest image vytvoří blok, která zobrazuje poslední přidaný obrázek na webu a odkazuje na danou fotogalerii. Tag: gallery Název: Nadpis: None Style: Grid; Number of columns: 3 Row style: Use AJAX: Ano Use pager: Ano Items per page: 9... Arguments More link: Ne Empty text: Filtered HTML: Do této fotogalerie nabyly zatím nahrány žádné fotografie. Nahrát je můžete pomocí tlačítka: Nahrát fotografie. Obsah:Gallery o Do not use a relationship o Hide view/page not found (404) o Validator: Uzly:Gallery o Validate user has access o Argument type: Node ID o Action to take if argument does not validate: Hide view Uzly:Nadpis Uzly:Post date o Time ago (with ago appended); Custom date format: 2 1
Sort criteria Uzly: Post date: asc Uzly:Published or admin Full gallery display typu: Node content uvádím jen rozdíly oproti Default Název: Full gallery Node content settings Node types: gallery Build modes: Full node Arguments: nid Show title: Ne o Format: thumb image linked to node Latest image teaser display typu: Node content Název: Latest image teaser Style: Unformatted Items to display: 1 Node content settings Node types: gallery Build modes: Teaser Arguments: nid Show title: Ne o Output this field as a link: Link path: node/!1 2
Block latest image display typu: Node content Název: Block latest image Style: Grid; Number of columns: 1 Items to display: 1 Relationship o Label: Gallery o Require this relationship Uzly: Nid o Relationship: Gallery o Label: Nid o Exclude from display Obsah: ImageFU o Output this field as a link: Link path: node/[nid] o Label: none View: all_galleries Slouží k výpisu všech fotogalerií. Zároveň díky Kategorie: Term a správně nastavenému Pathauto zpracovává termíny z taxonomy. Tag: gallery Název: Všechny galerie Nadpis: Fotogalerie Style: Unformatted Row style: Uzly o Build mode: Teaser o Display links Use AJAX: Ne Items per page: 10 Sort criteria Uzly: Post date: desc Uzly: Typ: Galerie Stránka 3
Název: Stránka Page settings Cesta: fotogalerie Arguments Kategorie: Term Uzly: Typ: Galerie Kategorie: Term o Vocabulary: Fotogalerie_rok o Selection type: Dropdown o Expose o Neklikat na žádný termín! o Label: Filtrujte podle roku o Force single View: admin_gallery Vytvoří správce galerie. Tag: gallery Stránka Název: Stránka Nadpis: Správce galerie Style: Bulk Operations o Override normal sorting if click sorting is used o Enable Drupal style "sticky" table headers o To execute operations: Invoke them directly o Display operations as: Dropdown selectbox with Submit button o Display processing result o Selected operations: zaškrtněte podle uvážení a potřeb. Pro nás je důležité: Modify node fields. Pomocí něj můžeme přesouvat obrázky mezi galeriemi. Use AJAX: Ne Use Pager: Ano Items per page: 20 Empty text: Filtered HTML: Žádná položka neodpovídá nastavení filtru. Zkuste změnit nastavení. Page settings Cesta: sprava_galerie 4
Obsah: ImageFU o Label: Vlastní: Náhled linked to node Uzly: Nadpis o Link this field to its node Uzly: Has new content Uzly: Nid o Label: Vlastní: Galerie o Format: Title(link) Uživatel: Název o Label: Autor o Link this field to its user Uzly: Typ Uzly: Edit link o Label: Upravit Uzly: Delete link o Label: Smazat Sort criteria Uzly: Updated date: desc Uzly: Nadpis o Operators: Contains o Label: Název obsahuje Uzly: Typ o Is one of: Galerie, Fotka o Label: Typ obsahu o Force single o Limit list to selected items o Is one of o Label: Galerie 5