Choose your navigation approach
Is this page helpful?
depth
parameter to retrieve more than one level of subpages or linked items if you want to show all navigation with one API call.
modular_content
property of the response.
And that’s it! You now have a dynamic menu that your content creators can manage entirely from Kontent.ai.
# Tip: Find more about Ruby SDKs at https://kontent.ai/learn/ruby
require 'delivery-sdk-ruby'
delivery_client = Kontent::Ai::Delivery::DeliveryClient.new project_id: '8d20758c-d74c-4f59-ae04-ee928c0816b7'
# Gets navigation items and their linked items
delivery_client.item('root_navigation_item')
.depth(5)
.execute do |response|
item = response.item
end
# Gets specific elements of all articles
delivery_client.items('system.type'.eq('article'))
.elements(%w[title url])
.execute do |response|
items = response.items
end