<![CDATA[ [FAQ] My snippet call isn't working ... - My Forums]]> https://forums.modx.com/thread/?thread=15512 <![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83511

GoogleEvents looks ideal for displaying the rehearsal and concert schedule on our big band’s web site, that I’ve taken over and built in MODx 1.0.2, but I can’t get it to display anything on the page. I’m sure I must be doing something very simple wrong. The call I’m currently using is this:

[!GoogleEvents?dayNameSize=`3`&outputType=`list`&maxEvents=`50`&lastEvent=`365`&email=`[ourcalendar]@gmail.com`&dateFormat=`D,Mj`!]

I’ve tried adding in spaces between parameters, taking them out etc. but all I’m seeing on the page is the title that I’ve put in as text, not even an error message or the text of the snippet call. Any ideas?

A possibly related question is this: the readme instructions give the parameters and sample snippets followed by a list of placeholders, separated by the (to me) intriguing sentence

The placeholders that you can use in the chunks passed to the snippet for a template are:

Does this mean the snippet won’t work without using chunks that I’d have to code myself? Is this the "something obvious" I’m missing?

I don’t know if it’s relevant, but another snippet on another page (SimpleSlideShow) has also suddenly stopped working - well I say stopped working, but actually the page is defaulting to the home page (presumably an error and I have return to home page in the event of an error set in the config). All I have done is add the installation/site sub-directory to .htaccess and set the site ready to use friendly URLs

Thank you very much in advance!]]>
Pipemma Dec 28, 2009, 10:36 AM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83511
<![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83510 opengeek Nov 10, 2009, 03:50 PM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83510 <![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83509
The text which is presented comes from about 60% into the code. I’ve tried to understand why it starts to produce this output at this point instead of executing... but unfortunately I do not have the full knowledge of coding.

I’ve got this code from this thread:

http://modxcms.com/forums/index.php/topic,9617.0.html (on page 6 I think)

The snippet call looks like this:

[!Kalender?&parent=`68`!]


Why does it not work...?

Thanks a lot in advance for replies!]]>
smf Nov 10, 2009, 12:47 PM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83509
<![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83508 [tt][!NewsPublisher? &folder=`13` &makefolder=`1`!][/tt]

2nd thought: Are you by any chance running a fresh install of MODx 1.0.1?
IIRC NewsPublisher is’nt any longer bundled with the core...

Greetz
JUSI

EDIT @JJJames: Please don’t double post that way wink
http://modxcms.com/forums/index.php/topic,41597.0.html
]]>
jusicgn Oct 30, 2009, 05:40 AM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83508
<![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83507 [!NewsPuplisher? &folder=``13 &makefolder=`1`!]

results: nothing is displayed]]>
JJJames Oct 30, 2009, 03:37 AM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83507
<![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83506 Quote from: DfX at Jan 13, 2007, 02:22 AM

heh...thanks for that one!

I was just going to ask...strange thing though..some of my calls work without a tick at all. Found weird.
Backticks..yeah. NOT single quotes...doh!

grin
The backticks are optional, but are a good best practice to follow, as they were designed to allow extra whitespace between your snippet parameter values. This is so snippet tags with long parameters strings wrap in the editors.

Consider these tags and resulting extracted variables...
[[snippet?foo=bar &foo2=bar2]]
would result in:
<?php
$foo == 'bar ';
$foo2 == 'bar2';

while:
[[snippet?foo=`bar` &foo2=`bar2`]]
would be:
<?php
$foo == 'bar';
$foo2 == 'bar2';
]]>
opengeek Jan 12, 2007, 08:57 PM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83506
<![CDATA[Re: [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83505
I was just going to ask...strange thing though..some of my calls work without a tick at all. Found weird.
Backticks..yeah. NOT single quotes...doh!

grin]]>
DfX Jan 12, 2007, 08:22 PM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83505
<![CDATA[ [FAQ] My snippet call isn't working ...]]> https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83504
[*] Use backticks around your parameters, not single-quotes: &param=`foo`
[*] If you are working with a snippet that needs to process a form, always call it uncached: [!snippet?param1=`foo` &param2=`bar`!] (or put it on a document that is set to not be cached in the Page Settings tab)
[*] If your page simply prints the snippet call rather than executing it, check the spelling and case of your snippet name in the call and make sure it matches the actual name of the snippet. Snippet names are case-sensitive.
[*] If the parameters in your snippet call are not reaching your snippet, make sure there are no spaces around the equals signs in the call.

Wrong: [[SnippetName? &param = `value`]] (note the extra space around the equals signs)
Right: [[SnippetName? &param=`value`]]
]]>
rethrash Jan 05, 2007, 08:59 AM https://forums.modx.com/thread/15512/faq-my-snippet-call-isn-t-working#dis-post-83504