How to Enlarge the TYPO3 Alias Field

This tutorial shows you, how the alias32 extension can be modified to resize the Alias field up to 255 characters.

The Alias field (located in the page properties of a TYPO3 page) can be used to specify the URL (or a part of it) of a page in the frontend. This can be very useful, if you want to get URLs like /index.php?id=products or (using SimulateStaticDocuments or the realurl extension) /products.html rather than the default URLs with IDs (/index.php?id=42). If you write the word 'products' into the Alias field, the page's URL will then be rewritten according to the used URL rewriting mode (SSD, realurl or neither of them).

Alias field in the TYPO3 backend
Alias field in the TYPO3 backend

By default, TYPO3 limits the length of the Alias field to 20 characters. To loosen this limitation, the extension "Extend Alias length to 32" (extension key: alias32) has been implemented, which changes the length of the Alias field to 32 chars. But this is only a small improvement.

Below, we show you step-by-step, how you can enlarge the Alias field up to a length of 255 characters with two small modifications of the alias32 extension.

How to do it

Download the alias32 extension in the Extension Manager, but don't install it yet. Choose the extension and select Edit files in the dropdown box.

Modify the ext_tables.php file
# Change the line ...
$TCA["pages"]["columns"]["alias"]["config"]["max"]="32";
 
# ... into:
$TCA["pages"]["columns"]["alias"]["config"]["max"]="255";
Modify the ext_tables.sql file
# Change the line ...
alias varchar(32) DEFAULT ''
 
# ... into:
alias varchar(255) DEFAULT ''

Now install the extension as usual. To do so, just click on the link "Click here to install the extension".