Hi there.
I want to grab some articles to be displayed on the homepage using pdoTools, but i am not sure which is the correct syntax to be displayed in the chunk:
[[+introtext:default=`[[+content:ellipsis=`80`]]`:ellipsis=`80`]]
[[+introtext:empty=`[[+content:ellipsis=`80`]]`:ellipsis=`80`]]
The idea is: If the introtext is empty, then go for the content. Limit both of them to 80 characters.
Is the syntax above correct ?
Tks
The forum removes the formatting, so here is an image in case:
markh
September 16, 2021, 9:44am
3
That syntax looks fine to me, but I think [[+content]] will only be available if you add &includeContent=`1` to the snippet call.
default and empty output modifiers are identical.
It’s also not necessary to do ellipsis separately on the content and introtext; just having it at the end should work fine.
To post code on the forum while keeping formatting , wrap it in 3 ticks: ``` <code here> ```
Thanks! And thanks for the forum tip too