Official DYNO API

Official DYNO API

Below is a list of all supported DYNO functions.  No additional/custom commands are allowed, as running untested commands could have a large negative impact on our client’s websites.

NOTE: most commands accept “classes” and “styles” as their last 2 parameters. This will apply those styles to the element as part of the operation.

Simple Hide & Show

m360_empty(‘div id’);

   removes all the context of an element, without removing that element

   required parameter: e — div ID or selector

m360_hide(‘div id’);

   hides, but does not remove the element (same as “display none”)

   required parameter: e — div ID or selector

m360_show(‘div id’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   shows a hidden element. element must exist

   required parameter: e — div ID or selector; c — name of class to apply (optional); s — styles to apply, in standard inline css syntax (optional)

Changing Styles, Adding CSS and more

m360_clearClass (‘div id’);

   removes ALL classes from an element

   required parameter: e — div ID or selector

m360_clearCSS (‘div id’);

   removes ALL css from an element

   required parameter: e — div ID or selector

m360_addCSSBlock (‘#header {font-size: 17px; color: blue;….}’);

   adds inline css class definitions to the page. standard css definitions, all on one line (or with \ at the end of each line)

   required parameter: css style definitions

m360_addStyle (‘div id’, ‘Blue-Class-Header’, ‘font-size: 17px; color: blue;….’);

   applies a class or inline css to an element, right away.

   required parameter: e — div ID or selector; c — class name to apply to element; s — styles to apply, in standard inline css syntax

m360_addbg (‘div id’, ‘/images/new_background_blue.jpg’, 200, 400, ‘no-repeat’);

   adds a background image to a specific container that supports it.

   required parameter: e — div ID or selector; i — image path; h — height of background image in pixels; w — width of background image in pixels; r — repeat flag

Moving Elements Around on a Page

m360_moveFirst (‘element_reference’, ‘element_selected’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   append the selected element inside of the referenced element

   move an existing element to a new location on the page, relative to another element (after that element)

   required parameter: e — div ID or selector; r — reference element; c — class name; s — style

m360_moveLast (‘element_reference’, ‘element_selected’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   prepend the selected element inside of the referenced element  

   move an existing element to a new location on the page, relative to another element (immediately before that element)

   required parameter: e — div ID or selector; r — reference element; c — class name; s — style

m360_moveAfter (‘element_reference’, ‘element_selected’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   move the selected element after the referenced element

   move an existing element to a new location on the page, relative to another element (after that element)

   required parameter: e — div ID or selector; r — reference element; c — class name; s — style

m360_moveBefore (‘element_reference’, ‘element_selected’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   move the selected element before the referenced element  

   move an existing element to a new location on the page, relative to another element (immediately before that element)

   required parameter: e — div ID or selector; r — reference element; c — class name; s — style

m360_replaceHTML (‘div id’, ‘<div>New Content</div>’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   replaced the current contents of the specified element with new html contents (can include any valid html)

   required parameter: e — div ID or selector; h — new html; c — class name; s — style

m360_replaceImage (‘div id’, ‘/images/new_image_blue.jpg’, ‘NewClass’, ‘background-color: blue;’);

   replaced the current contents of the specified element with new html contents (can include any valid html)

   required parameter: e — div ID or selector; h — new image source path (relative or absolute); c — class name; s — style

Adding Content, Images and more to a Page

m360_addFirst (‘div id’, ‘New Content’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   insert new html or text to the page, as the first element within the specified div, above any existing contents

   required parameter: e — div ID or selector; h — new html; c — class name; s — style

m360_addLast (‘div id’, ‘New Content’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   insert new html or text to the page, as the last element within the specified div, below any existing contents

   required parameter: e — div ID or selector; h — new html; c — class name; s — style

m360_addBefore (‘div id’, ‘New Content’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   insert new html or text to the page, as the element immediately before the specified div

   required parameter: e — div ID or selector; h — new html; c — class name; s — style

m360_addAfter (‘div id’, ‘New Content’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   insert new html or text to the page, as the element immediately after the specified div

   required parameter: e — div ID or selector; h — new html; c — class name; s — style

m360_addButton (‘div id’, ‘/submit.asp’, ‘/images/button_blue.gif’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   add a new active button to the page, using the image source specified as the clickable button, and the target url as the action of that button

   required parameter: e — div ID or selector; t — target url for button action; i — path to image for button; c — class name; s — style

m360_addImage (‘div id’, ‘/images/pretty_picture.gif’, ‘NewClass’, ‘background-color: blue;’);

   add a new Image to the page, using the image source specified

   required parameter: e — div ID or selector; i — path to image for button; c — class name; s — style

m360_addLink (‘div id’, ‘/submit.asp’, ‘Click Here’, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   add a new active text link to the page, using the text specified as the clickable link, and the target url as the action of that button

   required parameter: e — div ID or selector; t — target url for button action; l — text to use as link name; c — class name; s — style

var alist = new Array(

    ‘Track your spending with online budgeting tools and alerts to your mobile phone.’,

    ‘Pay rent, utilities and other bills online or over the phone.’,

    ‘Get paid up to two days faster with free Direct Deposit.’

);

m360_addList (‘div id’, alist, ‘NewClass’, ‘font-size: 17px; color: blue;’);

   adds a new list to the page immediately inside of the specified element, using the array passed in to create the list elements. bullets and styles can be specified.

   required parameter: e — div ID or selector; l — array holding items for creating list; c — class name; s — style

Private Control Functions

m360_matchPage (/some_unique_url_frament_as_regex/);

typical usage:

    if( m360_matchPage(/applynow\.php/) ) {

        do some styling

    } else if ( m360_matchPage(/thankyou\.php/) ) {

        do some styling

    }

   used to develop conditional blocks that will only execute on certain pages of the flow.

   required parameter: r — regular expression between /…./

Tracking Transactions & Conversions

m360_clicktrans (‘div id’, ’123.45′, ‘Store Lookup’);

   adds tracking for clicks on specific buttons or links that will trigger a fixed value transaction when clicked.

   should be used ONLY for clicks that indicate monetization, such as “store lookup”, “add to remote shopping cart”, etc….

   required parameters: e — element; v — total value of transaction; p — product or product category name

Dynamic Data Insertion (variables)

There are variables which can be used when creating microsites that allow for dynamic data to be passed along to the user.

The variables are wrapped in open and close delimiters like:  /*{ <variable> }*/ 

A commonly used variable is  /*{$cdn_server}*/ which dynamically inserts the Magnify360 CDN server url when the microsite is rendered.  See the cdn_server variable example below:

<img src=”/*{$cdn_server}*//somedir/image.png” alt=”” />

Here is an example of using the keyword and network data which is passed in from the source parameter:

You searched for /*{ $d.sources.keyword }*/.  Here are your results:

Thanks for searching using /*{ $d.sources.network }*/!