0

Change destinationId of snippet

Hi all,

I have problem with changing destinationId of snippet.
I can get all properties: id, type, src, name except data. (I can get id by controller.config.id, type by controller.config.type, but if i use controller.config.data, it returns undefined). My need is changing destinationId in data.

My config for snippet:
snippets: [{
id: 'snippet_logon',
type: 'SNIPPETS',
filename: 'config/window.xml',
name: 'Track',
src: 'source/snippet.js',
data: {
destinationId: 'section-logon'
}
},


...in my code:

if (crit) {
change destinationId to 'section-upgrade';
}
If you know, please help me. Thanks so much.

by
1 Reply
  • We highly recommend you switch over to using Framework 1.1 which is included in the latest WDK. The older version you are using will be deprecated soon. If you would like code samples of how that works, please take a look at any of the provided widgets. In Finance / News / Video you can find an example of how to control the destination in the files:

    Finance - DynamicTickerSnippet.js
    News - NewsSnippetView.js
    Yahoo! Video - VideoSnippetView.js

    If you need help porting your code to the latest framework (which going forward we will insure backwards compatibility, but the changes necessary to get to 1.0 required us to make improvements in the structure / interfaces to support a more flexible API) please feel free to contact me offline.
    0

Recent Posts

in General - Yahoo! TV Widgets