That’s a very logical idea, and I’m certain that I’ve tried it myself before. As I recall, a chunk can only be HTML, and will not work with any snippet calls.
I can’t think of an obvious answer... let’s see... you could set up a TV, have the input be radio buttons (or dropdown options), and have the default be "nothing", and the other selection be your call. Might be worth a try. Now that I think about it, I don’t know if you can have a snippet call there, either, but it might work.
Cheers, Dave
shouldn’t all parameters in your snippet call be like =`true` instead of just true
I haven’t tried snippet calls in a chunk in ages, it just hasn’t come up, so I’m thinking that Cipa is probably right! Maybe it will work fine, but you just have some typos.
Snippets from chunks works for me.
I am calling WebloginPE from a chunk.
The rule as I understand is no PHP in chunks but PHP in snippets.
DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
simply changed [! snippet code !] to [[snippet code]] and it worked!
Thanks for all your help.
Quote from: cipa at Mar 05, 2010, 11:13 AM
And also according to the documentation the order of execution is:
1. [*content*] -- Template variables (built-in and custom)
2. [(site_name)] -- Settings tags
3. {{chunk}} -- Chunk tags
4. [[Cached_Snippets]]
5. [+placeholders+]
6. [!Uncached Snippets!]
7. [~11~] -- Link tags
8. [^t^] -- Timing tags
Cipa, Can you tell me where you found that?
-
☆ A M B ☆
- 24,524 Posts
All MODx tags can be used in chunks. I frequently put snippets with complex parameter lists in chunks so that TinyMCE (or a carelessly editing client) won’t mess with them. Much easier to fix a damaged chunk tag than a snippet call!