Wiki source code of GoogleGadgetsMacroCode
Last modified by Anca Luca on 2010/05/21 12:40
Hide last authors
author | version | line-number | content |
---|---|---|---|
1.1 | 1 | {{velocity}} | |
2 | $xwiki.ssx.use("MacrosCode.GoogleGadgetsMacroCode") | ||
3 | ## | ||
4.1 | 4 | ## Only display rendered Gadget in View/Inline mode // Due to WYSIWYG bug | |
5 | #if($context.action != 'edit') | ||
6.1 | 6 | ## | |
7 | #set($defaultParams = '&synd=open&lang=en&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js') | ||
8 | #set($customParams = '') | ||
9 | #set($paramNames = $context.macro.params.parameterNames) | ||
10 | #foreach($paramName in $paramNames) | ||
11 | #set($paramValue = $context.macro.params.get($paramName)) | ||
12 | #set($customParams = "${customParams}&${paramName}=${paramValue}") | ||
13 | #end | ||
14 | #set($url = "http://www.gmodules.com/ig/ifr?url=${gadgeturl}${customParams}${defaultParams}") | ||
15 | {{html}}<div><script src="$url"></script></div>{{/html}} | ||
1.1 | 16 | #else | |
8.1 | 17 | == Gadget == | |
18 | image:$!thumburl | ||
1.1 | 19 | #end | |
20 | {{/velocity}} |