For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a section with a SLUG

curl https://mburger.cloud/api/blocks/<id>/sections
-X POST 
-H "Accept: application/json" 
-H "Content-Type: application/x-www-form-urlencoded"
-H "X-MBurger-Token: <token>" 
-H "X-MBurger-Version: 3"
-d 'elements[<locale>][mburger_slug]=<value>'
let factory = MBUploadableElementsFactory(localeIdentifier: "en")
let elements = [factory.createSlugElement(slug: "the-slug-of-the-section")]
MBAdmin.addSectionToBlock(withBlockId: BLOCK_ID,
                          elements: elements,
                          success: { sectionId in
                                    
                          },
                          failure: { error in
                                    
                          })
val params = ArrayList<MBAdminGenericParameter>()
params.add(MBAdminSLUGParameter(slug_value = YOUR_SLUG_VALUE))

val addSectionListener = object: MBAdminAddSectionListener{
            override fun onSectionAdded(section_id: Long) {
            }

            override fun onSectionAddedError(error: String) {
            }
        }

MBurgerAdminTasks.addSection(
                    context = applicationContext, 
                    block_id = BLOCK_ID, 
                    listener = addSectionListener, 
                    params = params,
                    locale = Locale.getDefault().getLanguage());

Last updated