Skip navigation.

Undefined

talk talk about Umbraco, .NET

Posts tagged with "umbraco"

Umbraco modules for Runway

,

Sander and I launched 2 new packages a few weeks ago. Thought I should mention it here too :-) We're pretty happy with the result so... a FAQ module and a jCarousel module. Where you can find the new modules: http://packages.netcentric.be/ Hopefully there will be coming more soon :-)

Google Sitemap

, ,

I actually just adjusted the standard sitemap xslt :smile: -- you should install umbraco utilities for this, to change the mime-type or use <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/> in umbraco v4 (thanks to bootnumlock) -- don't forget to change the url in the xslt :smile: --

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<!-- update this variable on how deep your site map should be -->
<xsl:variable name="maxLevelForSitemap" select="10"/>

<xsl:template match="/">
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<xsl:call-template name="drawNodes">  
<xsl:with-param name="parent" select="$currentPage/ancestor-or-self::node [@level=1]"/>  
</xsl:call-template>
</urlset>
</xsl:template>

<xsl:template name="drawNodes">
<xsl:param name="parent"/> 
<xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)">
<xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]"> 
<url xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<loc>http://www.corazine.com<xsl:value-of select="umbraco.library:NiceUrl(@id)"/></loc>
<lastmod><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'yyyy-MM-dd')"/></lastmod>
<changefreq>weekly</changefreq>
</url>
<xsl:if test="count(./node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]) > 0">   
<xsl:call-template name="drawNodes">    
<xsl:with-param name="parent" select="."/>    
</xsl:call-template>  
</xsl:if> 
</xsl:for-each>
</xsl:if>
</xsl:template>
</xsl:stylesheet>


and the template:

<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<umbraco:Macro ContentType="text/xml" Alias="uuContentType" runat="server"></umbraco:Macro><?xml version="1.0" encoding="UTF-8"?><umbraco:Macro Alias="SitemapXml" runat="server"></umbraco:Macro>
</asp:Content>


et voila :smile:

umbraco Base

,

note to myself, if you want to use Base and pass a variable:
  • make a C# method you want to use
  • put dll in bin folder
  • add it to restExtensions.config in the config file
    <ext assembly="/bin/namespace" type="namespace.classname" alias="alias">
        <permission method="methodname" allowAll="true" />
      </ext>

  • hah! now you can access it through domainname/Base/alias/methodname/variable.aspx, when not using a variable you can just access it through domainname/Base/alias/methodname.aspx