Home  ›  BLOG  ›  2008  ›  5
Salsa - Tanzschule Jakob - Nikolas - Di 27.05.08
Samstag, 31. Mai 2008, Christoph Ertl

Vermutlich aufgrund des tollen Wetters etwas schlechter besucht. Aber wie immer ein super Abend und eine tolle Figur.

Salsa - Tanzschule Jakob - Nikolas - Di 20.05.08
Mittwoch, 21. Mai 2008, Christoph Ertl

Heute war eine Schrittfolge ohne Partner angesagt.

Abschließend haben wir dann doch auch noch paarweise was gelernt. Bin schon gespannt auf die nächste Fiesta, wie viele Damen in der Luft herumgewirbelt werden.

List categories of Umbraco blog
Sonntag, 18. Mai 2008, Christoph Ertl

I'm not sure if I deleted the xslt file or am just kind a blind. But I found nothing providing me a listing of all available categories and their count of occurrence. So here is my solution.

First of all we have to know the id of the data type used for the categories. Execute the following statement against the database and note the resulting dataTypeId.

SELECT dataTypeId FROM cmsPropertyType
WHERE alias =
'categories'

The resulting id (in my case: 1094) is used in the xslt macro to get all predefined values. The macro iterates over all predefined values of the dataType with the id 1094 and counts all nodes of type umbracoBlogPost containing this predefined value.

<xsl:for-each select="umbraco.library:GetPreValues(1094)/node()">
<
xsl:sort />
<
a>
  <
xsl:attribute name="href">
    <
xsl:text>/blog.aspx?filterBy=</xsl:text><xsl:value-of select="current()"/>
  </
xsl:attribute>
  <
xsl:value-of select="." />
</
a> (<xsl:value-of select="count($currentPage/ancestor-or-self::node/descendant-or-self::node [@nodeTypeAlias = 'umbracoBlogPost' and string(data [@alias='umbracoNaviHide']) != '1' and contains(./data [@alias='categories'], current())])" />)

  <br/>

</xsl:for-each>

To get the macro work properly you have to use the id of the dataType as described above and correct the url to point to the page supporting the filterBy parameter.

Salsa - Tanzschule Jakob - Nikolas - Di.13.05.08
Mittwoch, 14. Mai 2008, Christoph Ertl

Danke an Andi für das Video.

Salsa - Tanzschule Jakob - Nikolas - Di 06.05.08
Freitag, 09. Mai 2008, Christoph Ertl