Umbraco/Reference/TextGen
Appearance
Graphic headlines with TextGen.aspx
[edit | edit source]Introduction
[edit | edit source]Textgen.aspx generates a graphic-headline depending on the parameters passed to it.
Preparations
[edit | edit source]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 editor
[edit | edit source]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 templates
[edit | edit source]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"/>
Parameters
[edit | edit source]Name | Description | Example |
---|---|---|
Text | Text which should 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's
[edit | edit source]You can use TextGen.aspx with flat/friendly url's by using This Plugin.