Umbraco/Reference/TextGen

Graphic headlines with TextGen.aspxEdit

IntroductionEdit

Textgen.aspx generates a graphic-headline depending on the parameters passed to it.

PreparationsEdit

Before you can use the TextGen feature you need to upload the TrueType font file, which you'd like to use. Font files must be placed inside the umbraco/config/fonts directory. You also need to create an entry for your font in fonts.xml which resides in the same directory.

There are many truetype fonts available in the windows directory 'fonts' folder.

Usage within the Rich text editorEdit

You can insert a dynamically generated image into the richtext-editor by clicking the icon beside the Bold and Italic-icons (Two A's).

Usage within templatesEdit

Place the following code in your Umbraco template (ensure you url encode the text parameter):

<img 
alt="Your Text Here" 
src="/umbraco/TextGen.aspx?
        text=Your+Text+Here
        &font=arial
        &size=48
        &color=ffcc33
        &bgColor=ffffff
        &bold=1" 
border="0"/>

ParametersEdit

Name Description Example
Text Text which sould be displayed.
text=my+first+text
Color Text color
color=ff00ff
Background Color Background color
bgcolor=00ff00
Font Name This is the name of the font file without the .ttf file-extension.
font=verdana
Size Text size
size=12
Bold If the value of this parameter is not null then the text will be bold.
bold=1

Flat URL'sEdit

You can use TextGen.aspx with flat/friendly url's by using This Plugin.

Last modified on 30 July 2006, at 09:08