Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Chambers 636 posts 1253 karma points c-trib
    Mar 10, 2011 @ 12:43
    Mike Chambers
    0

    enumerating the available templates.

    are there inbuilt core methods for accessing available templates?

    I'm writing an import process from my existing cms to umbraco and need to match old template to new umbraco template.

    for instance the old would have template of "sitemap"

    In umbraco I want this to be a masterDocumentType with the template of "sitemap"

    d.Template accepts an int, looking in the db at the cmsTemplates table I can see that the "sitemap" template I have created has id 1718.

    But wondered if rather than having to retrieve data direct from the db table to find the id of the matched template if any core methods existed.

     

    Cheers

  • kows 81 posts 151 karma points c-trib
    Mar 10, 2011 @ 15:41
    kows
    0

    umbraco.cms.businesslogic.template.Template look into that class its methods.

  • Mike Chambers 636 posts 1253 karma points c-trib
    Mar 10, 2011 @ 16:17
    Mike Chambers
    0

    d.Template = umbraco.cms.businesslogic.template.Template.GetTemplateIdFromAlias("sitemap");

     

    exactly what I wanted... cheers.

Please Sign in or register to post replies

Write your reply to:

Draft