Weather API iconset

by 17. December 2010 07:04

http://www.webandsay.com/images/55-free-high-quality-icon-sets/weather_icons.jpg

Tags: ,

XSLT extensions Sitecore

by 8. December 2010 02:16

When working with Xslt Extensions in Umbraco it is pretty simple

because you only need to set the reference in corresponding config file in the /config folder and Umbraco sees your extension method directly when creating a new XSLT file.

however when using SiteCore you can de exact same thing.

i found this article by Jens Mikkelsen

http://learnsitecore.cmsuniverse.net/Developers/Articles/2009/06/how%20to%20XSLExtensions.aspx

 

Getting started with XSL extensions – part 1

XSLT is a great technology to use to output HTML from Sitecore’s XML.
XSLT should be used instead of sublayouts, whenever there is no need for complex logic.
However sometimes you need a little chunk of logic to be performed or a simple operation to be executed in your XSLT. XSL extensions are great for this.

It allows you to call some C# / VB methods you from your XSLT.

This article will give you an introduction to writing XSL extensions.
It will show you, how you configure and call them, but also give some pointer and ideas on when and how to use them.

Setting up:
To create an XSL extension you must follow these steps:
  1. Create the C# method you want to call.
  2. Declare the extension in the web.config
  3. Declare the extension in your XSL file
  4. Call the method.
To illustrate this here’s a hello world example:

 

1: First the c# method:

namespace LearnSitecore.Examples.XSL
{
  public class MyXSLExtension
  {
    public string HelloWorld()
    {
      return "Hello World!";
    }
  }
}

 

2: Now it needs to be declared in the web.config. XSL Extensions are declared in the configuration/Sitecore/ xslExtensions section of the web.config. Here you need to specify the full namespace and class name for the method and a unique namespace to map the declaration in your XSLT. The entry should look like this:

<extension mode = "on" type="LearnSitecore.Examples.XSL.MyXSLExtension, LearnSitecore.Examples" namespace="http://www.learnsitecore.com/examples" singleInstance="true" />

Where the first part of the type is the fully qualified class name and the second part is the dll filename, where the class is placed in. The namespace is used to map the object into the XSL. You can define your own namespace and it hasn’t to be a real URL with an actual page on.

 

3:  To call the method in your XSLT you need to declare the extension as an attribute to the xsl:stylesheet element. As you can see, there are already a few declared. For instance Sitecores own extensions:

<xsl:stylesheet version = "1.0"
  xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
  xmlns:sc = "http://www.sitecore.net/sc"
  xmlns:dot = "http://www.sitecore.net/dot"
  xmlns:ls = "http://www.learnsitecore.com/examples"
  exclude-result-prefixes = "dot sc ls">


Here are all the extensions for this XSLT declared. The first thing you need to specify is the namespace declared in the web.config. Further you need to add the prefix you want to use to the exclude-result-prefixes attribute – in this case ls.
Now you can use the extension in your XSLT calling the HelloWorld method:

<xsl:value-of select = "ls:HelloWorld()"/>

Now the “Hello world!” text is outputted.
Congratulations! You have just created your first XSL extension

Tags:

IIS7 404 Umbraco

by 3. November 2010 23:24

source http://umbraco.codeplex.com/workitem/24786?ProjectName=umbraco

Add this to web.config

<system.webServer>
   <httpErrors existingResponse="PassThrough" />
</system.webServer>

 


Tags:

At last a Umbraco Manual

by 24. October 2010 07:36

Tags:

Umbraco 301 URL redirect package notes

by 24. October 2010 07:03

When i first came across this package, i thought it was just to install it, but no. you need a few tweaks before i can run

in the 404handlers.config file u need to move the "InfoCaster....." handler to the top like this

<?xml version="1.0" encoding="utf-8"?>
<NotFoundHandlers>
  <notFound assembly="umbraco" type="SearchForAlias" />
  <notFound assembly="umbraco" type="SearchForTemplate" />
  <notFound assembly="umbraco" type="SearchForProfile" />
  <notFound assembly="InfoCaster.Umbraco._301UrlTracker" type="Handler301URLTracker" />
  <notFound assembly="Umbraco.PoetPatcher" type="GenericError" />
</NotFoundHandlers>

by default it is added at the bottom, and therefore the 404 page not found kicks in, before the 301 have a chance to look at it.

get it here http://our.umbraco.org/projects/developer-tools/301-url-tracker

NOTE: in version 1.1 this is fixet

Tags: , , ,

Den forkromede løsning

by 24. October 2010 03:35

fra http://blog.hamann.tk/?p=94

Hvis du ikke har beskrevet dine behov godt nok, hvordan skal udviklerne så løse dem?

  • De forskellige faser
    • Valg af domæne(r)
    • Valg af hosting udbyder
      • Hvilke krav er der til oppetid, backup, sikkerhed
    • Valg af system/platform (CMS)
      • Hvilke krav er der til standard funktionalitet
      • Hvilke krav er der til fleksibilitet?
      • Er der krav til programmeringssprog?
      • Husk at tænke: Hvad skal min løsning kunne på sigt?
    • Foranalysen
    • Kravspecifikation
    • Informations Arkitektur
    • Brugertest
    • Design/usability (tænk som en bruger)
    • Brugertest
    • Implementeringsfasen
    • Test fase (browsertest, funktionstest)

Konkrete spørgsmål og opgaver:

Hold workshops med de personer der ved noget!
Tænk fra dag 1 på hvordan din side skal findes (SEO, keywords)

  • Behovet for en ny webside?
    • Formålet? Hvad vil man med siden? Hvilke målbare mål og delmål er der.
  • Hvem er målgruppen / kunderne på siden?
  • Hvilke krav er der til webside?
    • Foranalyse
      • Tænk efterspørgsel fra kunderne
      • Hvordan ser den optimale løsning ud om 3 år? (gør de store tanker, og begræns til sidst – så er løsningen tænkt igennem. Ret til undervejs når du bliver klogere)
      • Del tankerne op i faser og behov (nice 2 have, need 2 have)
    • Interview / input fra alle der kommer i berøring med siden
    • Beskrivelse af de interne firmaprocesser
      • Er der evt. noget der kan optimeres?
      • Skal der integreres med noget?
        • Er der nogen der skal kunne trække på informationer fra websiden?
        • Er der nogen der skal levere informationer til siden?
    • Udarbejdelse af kravspecifikation
      • USE types
      • Platform
      • Funktioner
      • Performance
        • Database
        • Antal forventede daglige brugere
        • Samtidige brugere
        • Skalering
    • Tænk som dine brugere:
      • Hvem er målgruppen?
        • Persona: Navn, interesser, alder, køn, osv. – hvem bruger din side
  • Informations Arkitektur (Usability)
    • Workshop: Kortsorteringsøvelse, tænk i indhold så du ved hvor meget dine informationer kommer til at fylde
    • Hvad skal brugeren kunne på siden?
      • Søgning
      • Tænk på om dine kunder kommer direkte ind på forsiden, eller undersider?
      • Navigation (og hvor mange niveauer)
      • CTA – CALL TO ACTION (Hvad er det du vil have brugeren til at gøre?)
      • Skal der køre kampagner der henviser til siden? (Tænk landingpages, brugervenlige url’er)
    • Opbygning af IA
    • Lav en simpel prototype / brugerflade og TEST den – spørg dine brugere
  • Design / usability
    • Tag gerne udgangspunkt i konkret indhold der skal på siden.
    • Hvilke sites synes du fungerer bedst – og hvorfor?
    • Er der krav til designet der skal overholdes (logo, farver, fonte, m.m.)
    • Husk at tænke CTA
  • Implementeringsfasen
    • Sørg for alle kender MÅLET! og at designeren har beskrevet funktionerne.
    • Kod din CSS og HTML korrekt.
  • Testfasen
    • Funktionstest
    • Browsertest
    • Flere Brugertest
  • Tilretninger / korrekturer
  • Launch
  • Opfølgning

Tags:

textarea with empty content and xslt

by 2. July 2010 01:30

When XSLT is used in Umbraco, and you would like to use a <textarea></textarea> without any content, XSLT collapses the rest of the page output, since it sees it as <textarea/>

To get past this issue in XSLT you can simply do this:

<textarea><xsl:text>&#x0A;</xsl:text></textarea>

and XSLT is now rendering the content as empty textarea works.

Tags:

About Me

This is a personal blog and does not necessarely reflect the work i do daily

Bo Petersen

I work at www.synergi1.dk a full Service Advertising Agency,

I am fully Umbraco Certified with Level 1 and 2 certifications.
Umbraco Logo

I love my guitar and playing with my band and working daily Umbraco / XSLT / UserControls.

 

Page List