SmartletPreset Example
This is a preset for the feedreader smartlet from the Web Toolkit. It displays the general news feed from nu.nl, showing the description for each link (unless the showdescription property is set explicitely in the smartlet call) and disabling the evaluationscope input in the Smartlet Editor.
Let's call the smartlet preset item that contains this code "preset_nu_feed()"; this is how you would call it:
Smartsite SXML | Copy Code |
---|---|
{sml_feedreader(preset=preset_nu_feed())} |
Smartsite SXML | Copy Code |
---|---|
<se:smartletpreset smartlet="sml_feedreader" displayname="Nu.nl RSS feed" inherit="SMARTLETPRESETBASE"> <se:collection> <se:member name="url" settingtype="value" >http://www.nu.nl/feeds/rss/algemeen.rss</se:member> <se:member name="showdescription" settingtype="defaultvalue">1</se:member> <se:member name="evaluationscope" /> </se:collection> </se:smartletpreset> |
Example Result | Copy Code |
---|---|
Name=url; SettingType=0; Value=http://www.nu.nl/feeds/rss/algemeen.rss Name=showdescription; SettingType=1; Value=1 Name=evaluationscope; SettingType=0; Value=null Name=displayname; SettingType=3; Value=Nu.nl RSS feed Name=disablesmartlet; SettingType=3; Value=false Name=default; SettingType=1; Value= Name=cacheable; SettingType=3; Value=false Name=presetname; SettingType=3; Value=preset_nu_feed |