Category: Tipps & Tricks (18)

Tipps

how to create a post template in Publii which fetches posts by tag

When creating your own theme for Publli, you maybe want to list all posts regarding to one tag on a single page. This can be achieved by the following:

1. create an override folder as descibed here: https://getpublii.com/dev/theme-overrides/

2. copy the config.json from the original theme folder to the overrride folder and add something like

"postTemplates": {
  "portfolio": "portfolio filter"
},

as described here: https://cv.domagic.site/posts/alternative-post-template-with-filter-for-publii-cms

3. duplicate the index.hbs and move this copy to the override folder. Rename it to post-newname.hbs, as described here: https://getpublii.com/dev/how-to-create-custom-templates/

4. The post-newname.hbs now can be used as a post template. Create a post and choose the template: 

5. I built this template to show all posts regarding my trip to Mallorca, so I named the post template "mallorca filter", as it shows posts with the tag 'Mallorca', only.

To achieve this, follow the instructions: https://getpublii.com/dev/how-to-display-posts-connected-with-a-specific-tag-name/

Find the the {{#each post}} helper and replace it with 

{{#each @website.contentStructure.tags}}

and add 

{{#checkIf this.name '==' 'TAGNAME'}}
    {{/each}}
    {{#if this.postsNumber}}
    {{#each this.posts}}

Replace TAGNAME with the tag you want to show/filter. Use the name, not the slug, in my case Mallorca, not mallorca.

Find the closing helper part {{/each}} (from the the {{#each post}} above) and put the following code right before the helper:

{{/each}}
{{/if}}
{{/checkIf}}

 

Change Brackets' default browser

By default Live preview in Brackets is set to Google Chrome Browser. To change this
- Go to Debug
- Open Preferences file and
- change this line from “livedev.multibrowser”: false to “livedev.multibrowser”: true.

Close the Brackets App and open it again.

Clicking on  “Live Preview” should now start in your default browser (like Safari or any other browser).

A list of all the Godzilla movies in chronological order

1. Godzilla (1954)
2. Godzilla Raids Again (1955)
3. King Kong vs. Godzilla (1962)
4. Mothra vs. Godzilla (1964)
5. Ghidorah, the Three-Headed Monster (1964)
6. Invasion of Astro-Monster (1965)
7. Ebirah, Horror of the Deep (1966)
8. Son of Godzilla (1967)
9. Destroy All Monsters (1968)
10. All Monsters Attack (1969)


11. Godzilla vs. Hedorah (1971)
12. Godzilla vs. Gigan (1972)
13. Godzilla vs. Megalon (1973)
14. Godzilla vs. Mechagodzilla (1974)
15. Terror of Mechagodzilla (1975)
16. The Return of Godzilla (1984)
17. Godzilla vs. Biollante (1989)
18. Godzilla vs. King Ghidorah (1991)
19. Godzilla vs. Mothra (1992)
20. Godzilla vs. Mechagodzilla II (1993)
21. Godzilla vs. SpaceGodzilla (1994)
22. Godzilla vs. Destoroyah (1995)
23. Godzilla 2000: Millennium (1999)
24. Godzilla vs. Megaguirus (2000)
25. Godzilla, Mothra and King Ghidorah: Giant Monsters All-Out Attack (2001)
26. Godzilla Against Mechagodzilla (2002)
27. Godzilla: Tokyo S.O.S. (2003)
28. Godzilla: Final Wars (2004)
29. Shin Godzilla (2016)
30. Godzilla: Planet of the Monsters (2017)
31. Godzilla: City on the Edge of Battle (2018)
32. Godzilla: The Planet Eater (2018)
33. Godzilla: King of the Monsters (2019)
34. Godzilla vs. Kong (2021)

Cucumber Gin and Tonic

Ein klassischer cooler Longdrink, der ganz einfach zuzubereiten ist:

  • drei bis vier Eiswürfel in ein hohes Glas geben,
  • 30 Milliliter Dry Gin hineingießen,
  • drei Gurkenscheiben (geschält oder ungeschält, ganz nach Wunsch) hinzufügen
  • und mit 180 Milliliter Tonic Water aufgießen. Fertig!

Die übliche Zitronenscheibe lassen wir weg, aber wer mag, kann einen Zweig Basilikum hinzufügen.

Mit dem Tolino unterwegs

Tolino Vision 2

Alle tolino eBook-Reader verfügen über einen Zugang zu den HotSpots der Deutschen Telekom AG und bieten Ihnen somit an vielen Standorten in Deutschland kostenlosen Zugriff auf das Internet.