-
☆ A M B ☆
- 24,524 Posts
You need to post code in "code" tags; use the little < > icon in the post editing toolbar.
-
☆ A M B ☆
- 3,141 Posts
The toPlaceholder output filter was added in 2.2.0-rc1 so what you posted should work.
Make sure that any snippet properties are *after* the output modifier:
[[getRelated:toPlaceholder=`related`? &fields=`pagetitle:2,longtitle:10` ..etc.. ]]
<p>You may like:</p>
[[+related]]
-
☆ A M B ☆
- 24,524 Posts
http://rtfm.modx.com/display/revolution20/modX.setPlaceholder
Element properties are automatically available as placeholders; for example if a chunk has a property of
[[$myChunk? &myplaceholder=`somevalue`]]
you could use
in the chunk. I think to use with a snippet you would need to have a tpl for the snippet's output and use the placeholder tags in that tpl.
-
☆ A M B ☆
- 24,524 Posts
Learn something new every day
Almost good:
The snippet also outputs it's default output, AND fils the placeholder. Is there a way to only fille the placeholder, and skip the standard output??
-
☆ A M B ☆
- 3,141 Posts
Something like this?
[[getRelated:toPlaceholder=`related`:notempty=``? &foo=`bar`]]