Does anyone have an idea of what im doing wrong? I cant get a placeholder to work. Can I create a placeholder and call it in the main template?
Is the snippet executed before you try to use the placeholders?
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
I have tried placing the placeholders in the template. I have tried placing the placeholders in the *content* below the snippet. Neither one has worked.
-
MODX Staff
- 10,725 Posts
Is the placeholder appearing in a section of content that is cached?
The page was set to not be cached. And the snippet was set to not be cached either. It looks like it is only working if it is called without cache -ie [[mysnippet]]
Is there a reason it would not work if it was set to be cached?
It is working now though uncached.
So I’ve updated this snippet some. I think it works great!
More reasons to use it
I have a home page with two columns. The site owner wants to put his information in them. The left side has some different TV’s than the right side.
I create 2 sub-pages called ’left’ and ’right’.
In the home page I put a call to this snippet with a custom function that puts the left side content into one div and the right side content into another.
I’ll post shortly.