Open Specific Content

Open specific content

You can use the results component to open specific content directly. This is useful when you want to add specific content to a page, for SEO purposes for example.

Open content with a specific ID

Use the method openContentById to open content in the results component. In the following example, content 1 is opened:

  var results = sdk.component('results', '#results');

Open content with a specific slug

Use the method openContentBySlug to retrieve content using a slug from the Backstage:

  var results = sdk.component('results', '#results');

You can also open content with a URL. Take either the content's id or slug from the URL:


  • ID: To open the content 1, we can use the URL
  var faq = getQueryString('faqs'); // This function gets the faq parameter from the query string, in this case return 1.
  var results = sdk.component('results', '#results');
  • slug: To open the content What is Inbenta?, we can use the URL
  var slug = getUrlSlug(); // This function gets the slug form the url, in this case return 'what-is-inbenta'.
  var results = sdk.component('results', '#results');