What would be the best way to change the maxlength setting of the url_title on an entry page? I assume an extension would do the trick, but I am not sure where to start.
Basically, I want longer URL titles.
I am tempted to modify the database for this, but that just seems lame.
Tips would be greatly appreciated. 😊
I am guessing that an extension would not give me the ability to modify the url_title char limit in the database?
Anyway, I found a hackish solution (use at your own risk):
Database:
Using something like phpMyAdmin, Modify url_title “type” field in exp_channel_titles table. Just to show the database who’s boss, I bumped-up the char limit to 500 (stock setting is 75). 😊
FTP:
Modify system/expressionengine/controllers/cp/content_publish.php (@ and around line 1550):
//'field_maxl' => 75
'field_maxl' => 500Modify system/expressionengine/libraries/Api.php (lines 190 through 204):
$mh = FALSE;
switch($type)
{
case 'gallery' : $table = 'gallery_entries'; $url_title_field = 'url_title'; $type_field = 'gallery_id'; $self_field = 'entry_id';
break;
case 'category' : $table = 'categories'; $url_title_field = 'cat_url_title'; $type_field = 'group_id'; $self_field = 'category_id';
break;
default : $table = 'channel_titles'; $url_title_field = 'url_title'; $type_field = 'channel_id'; $self_field = 'entry_id';
$mh = TRUE;
break;
}
// Field is limited to 75 characters, so trim url_title before querying
//$url_title = substr($url_title, 0, 75);
$url_title = ($mh) ? substr($url_title, 0, 500) : substr($url_title, 0, 75);Could I do any of the above with an extension? As soon as I have some free time to kill, I might explore other options.
I am open to suggestions. 😊
Cheers, Micky
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.