Mtt
Mtt

@sod Since you are always the one who answers me in the help forum, decided to go straight to the source for this question. I've had no problem styling posts on my site based on the category (I simply add a .category-title class to those posts. But I want to go one step further. This is what I'd like:

  1. If a post doesn't have a title, show full content (working fine)
  2. If a post has a title, show truncated content (working fine)
  3. If a post has a title AND is in category "Bookmark", show full content (can't figure this one out)

Any help is appreciated. Thanks for all the time you've given to the community working through stuff like this!

|
Embed
sod
sod

@Mtt You could check for that combination with the following:

{{ if or (not .Title) (and .Title (in .Params.categories "Bookmarks")) }}
{{ .Content }}
{{ else }}
{{ .Summary }}
{{ end }}

|
Embed
Mtt
Mtt

@sod You’re amazing. Thank you!

|
Embed
Mtt
Mtt

@sod As a followup, this worked beautifully. Exactly what I needed.

|
Embed