What is the correct syntax for introtext using pdoTools/getResources?

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:

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> ```

1 Like

Thanks! And thanks for the forum tip too :+1:

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.