Copied to clipboard

Flag this post as spam?

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


  • Eddie Foreman 215 posts 288 karma points
    Jul 30, 2010 @ 16:22
    Eddie Foreman
    0

    Number on pages created from a template

    Hi Guys

    On a previous CMS I used to develop on, you could obtain a list of the pages that have been created from a specific template. It is possible to get this type of info from Umbraco/Umbraco package?  Always found this useful for site audits, as you could see how the client was using the templates.  And offer ways to improve or update a template that had little or no use.

    Thanks

    Eddie

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jul 30, 2010 @ 16:34
    Tom Fulton
    0

    Concierge (part of the Pro offering) has a similar report that shows all DocTypes, their properties, what Content (pages) are using them, and what Templates are allowed on each.

    Not aware of any way to do this in the free version, short of writing some database queries.

    -Tom

  • Dimitris Tsoukakis 33 posts 59 karma points
    Jul 30, 2010 @ 16:45
    Dimitris Tsoukakis
    0

    If you have db access you can use sql

    SELECT nodeId,[text] FROM cmsDocument where templateId=**your template id**

    You can find the template id, by placing your mouse over the template node on the umbraco templates tree.

    The id is the parameter of a javascript command. Look at your browsers status bar.

  • Dimitris Tsoukakis 33 posts 59 karma points
    Jul 30, 2010 @ 16:56
    Dimitris Tsoukakis
    1

    If you need to visualize your results or just need something reusable you can create a custom section. There's a great article here.

  • Medjeti 75 posts 126 karma points
    Jul 30, 2010 @ 17:05
    Medjeti
    0

    One thing to note is that content isn't created from a template, rather you apply a template to a given piece of content.

    The following snippet of XSL will accomplish the same as the above mentioned SQL:

    <xsl:value-of select="$currentPage/ancestor-or-self::root /descendant-or-self::* [@template='**template_id**']" />

    That said, it sounds like Concierge will meet your auditing needs.

  • Kim Løwert 130 posts 116 karma points
    Jul 30, 2010 @ 17:17
    Kim Løwert
    0

    Hi Eddie

    If you want to get an overview of the the use of all your templates you can use the following SQL.

    SELECT templateId,

          COUNT(nodeId)

      FROM [dbo].[cmsDocument]

      where published = '1'

      group by templateId

    This will get you the count of every templateId in use on published nodes in a list so you get an overview of the usage :)

    You can easily extend this query if you would rather want the template aliases.

    I hope this helps.

    Kim :)

  • Eddie Foreman 215 posts 288 karma points
    Jul 31, 2010 @ 10:47
    Eddie Foreman
    0

    Hi All

    Thanks for al the great replies. 

    Most clients are using the free version, so I think I'll go down the SQL approach with a custom section (Dimitris thanks for the reference to the article, very useful), which I can then (hopefully) use on all projects. 

    Thanks again

    Eddie

Please Sign in or register to post replies

Write your reply to:

Draft