Content Callback Functions
  • 1 Minute to read
  • Dark
    Light

Content Callback Functions

  • Dark
    Light

Article summary

The Syndi framework supports both "Has Content" and "No Content" callback functions.

Example Scenario

Content has to live in a tab on the website and you want to show/hide that tab depending on if content is present.

Callback Functions are placeholders for website owners to provide methods and/or functions which can be initiated by Syndi when one of two conditions are met:

  • Syndigo has content available for the page
  • Syndigo does not have content available for the page

Below is an example template for a website which has both "Has Content" and "No Content" callback functions:

(function () {​​​​
    window.SYNDI = window.SYNDI || []; 
    window.SYNDI.push({​​​​
        "contentCallback": function (hasContent) {​​​​
            if (hasContent)  {​​​​
                yourHasContentCallbackFunction(); //replace with your own function
            }​​​​
            else {​​​​
                yourHasNoContentCallbackFunction(); //replace with your own function
            }​​​​
        }​​​​
    }​​​​);
}​​​​());

where you replace "yourHasContentCallbackFunction" and "yourHasNoContentCallbackFunction" with the appropriate functional to take the desired action on your website.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence