Vytvoření pokročilé Fotogalerie v Drupalu - Views
Transkript
Vytvoření pokročilé Fotogalerie v Drupalu - Views
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. Defaults Tag: gallery Basic settings Název: Defaults Nadpis: None Style: Grid; Number of columns: 3 Row style: Fields Use AJAX: Ano Use pager: Ano Items per page: 9 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. Arguments 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 Fields Uzly:Nadpis Uzly:Post date o Time ago (with „ago“ appended); Custom date format: 2 Obsah:ImageFU o Label: None o Format: short image 1 Sort criteria Uzly: Post date: asc Filtry Uzly:Published or admin Full gallery – display typu: Node content uvádím jen rozdíly oproti Default Basic settings Název: Full gallery Node content settings Node types: gallery Build modes: Full node Arguments: nid Show title: Ne Fields Obsah:ImageFU o Label: None o Format: thumb image linked to node Latest image teaser – display typu: Node content Basic settings Název: Latest image teaser Style: Unformatted Use pager: Ne Items to display: 1 Node content settings Node types: gallery Build modes: Teaser Arguments: nid Show title: Ne Fields Obsah:ImageFU o Output this field as a link: Link path: node/!1 o Label: None o Format: short image 2 Block latest image – display typu: Node content Basic settings Název: Block latest image Style: Grid; Number of columns: 1 Use pager: Ne Items to display: 1 Relationship Obsah: Gallery o Label: Gallery o Require this relationship Fields 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 o Format: short image 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. Defaults Tag: gallery Basic settings Název: Všechny galerie Nadpis: Fotogalerie Style: Unformatted Row style: Uzly o Build mode: Teaser o Display links Use AJAX: Ne Use pager: Ne Items per page: 10 Sort criteria Uzly: Post date: desc Filtry Uzly: Typ: Galerie Stránka Basic settings 3 Název: Stránka Page settings Cesta: fotogalerie Arguments Kategorie: Term Filtry 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 Nepovinné o Force single View: admin_gallery Vytvoří správce galerie. Defaults Tag: gallery Stránka Basic settings 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 Fields Obsah: ImageFU o Label: Vlastní: Náhled o Format: short image linked to node Uzly: Nadpis o Link this field to its node Uzly: Has new content Uzly: Nid Obsah: Gallery 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 Filtry Uzly: Nadpis o Exposed o Operators: Contains o Label: Název obsahuje o Nepovinné Uzly: Typ o Exposed o Is one of: Galerie, Fotka o Label: Typ obsahu o Nepovinné o Force single o Limit list to selected items Obsah: Gallery o Exposed o Is one of o Label: Galerie 5