Dave Haigh
Dave Haigh

Reputation: 4547

Kentico CMS: Automate the generation of pages within a Kentico CMS site based on a block of HTML

I am creating a knowledge base esq site in a Kentico CMS.

This site will be updated on a fairly regular basis, which will include content edits and pages/sections being removed and added.

The HTML mark up is generated from an InDesign file (i.e. an InDesign Book file exported as an ePub, and then the ePub is unzipped in order to grab the HTML markup).

At the moment I can create a page structure manually in Kentico and paste the necessary block of mark up into each page. However eventually I will be dealing with a fairly complex site structure and so creating the site structure manually each time an update is made to the original InDesign document will be too time consuming. In fact I would have to delete all of the pages from the Kentico site and create them again from scratch in order to make sure no pages are left in that shouldn't be there.

Is there a way to generate the site structure in Kentico automatically based on a predefined block of HTML mark up? i.e. I could for instance create a new page at the beginning of each h1 or h2 tag.

As well as this automatic page generation I would also need it to nest the pages correctly in the site structure, i.e. if a page is created on a break at a h2 tag then this new page should be a child of the closest page that begins with a h1 tag.

e.g.

page beginning with H1 tag
    page beginning with H2 tag
    page beginning with H2 tag
    page beginning with H2 tag
page beginning with H1 tag
    page beginning with H2 tag
    page beginning with H2 tag

On top of this any H3 tags should have an entry in the CMS tree view but should not actually have their own page. H3 tags will exist on the same page as their nearest parent H2 tag.

e.g.

page beginning with H1 tag
    page beginning with H2 tag
    page beginning with H2 tag
        page beginning with H3 tag (not a new page - just an entry in the tree view)
        page beginning with H3 tag (not a new page - just an entry in the tree view)
        page beginning with H3 tag (not a new page - just an entry in the tree view)
    page beginning with H2 tag
page beginning with H1 tag
    page beginning with H2 tag
    page beginning with H2 tag

Does anyone have any pointers on where to start? Kentico is asp.net based so asp.net functionality could be utilized.

Upvotes: 1

Views: 472

Answers (1)

rocky
rocky

Reputation: 7696

I think that HTML2Kentico utility could solve your problem.

Upvotes: 0

Related Questions