Hi,
I'm a novice at creating modules so please excuse what is probably a basic question.
I am using CTLModuleMaker to create a news item database and want to use the 'name' field of an item to hold the headline of the item. The problem is the field is automatically created and it has it's length restricted to 32 characters. This is not long enough for my purpose and I would like to change it but I cannot see where this is defined in the module installation etc. There is nothing in the blueprint file that I can edit.
Can someone point me to where the name field of an item is defined in the instalation process of a module created with CTLModuleMaker?
Thanks,
Ray
CTLModuleMaker - length of name field
Re: CTLModuleMaker - length of name field
Try to insert this into your ... after the "name" parameter.
removed by moderator
Set it to 64 or whatever you want.
I didn't try it because I never needed it, but it should work.
removed by moderator
Set it to 64 or whatever you want.
I didn't try it because I never needed it, but it should work.
Re: CTLModuleMaker - length of name field
Hi,klenkes wrote:Try to insert this into your Blueprint.php after the "name" parameter.
Thanks for the help but I cannot see where the 'name' field is defined in the bluprint.php file. I can see where the fields that I have created are defined but not where the ones that are automatically created are. All there is, apart from the definitions of my fields, is...
'lvlid' => 'lvl2',
'name' => 'newsitem',
'name_singular' => 'newsitem',
'name_plural' => 'newsitems',
'femode' => 'closed',
'indexed' => '1',
'autonomous' => '1',
'normal_user' => '1',
'fe_allow_new' => '',
'adminfields' => array(
'0' => 'name',
'1' => 'active',
'2' => 'section'
)
Should I edit that part?
Ray
-
- Forum Members
- Posts: 127
- Joined: Fri Nov 28, 2008 10:28 pm
Re: CTLModuleMaker - length of name field
Has anyone work it out. I would love to know how to change maxchar for just the name. Its not in the blueprint.
Anyone help.
Cheers
Anyone help.
Cheers
Re: CTLModuleMaker - length of name field
Right! The standard fields that come with a module cannot be edited through the blueprint.andrewvideo wrote:Has anyone work it out. I would love to know how to change maxchar for just the name. Its not in the blueprint.
The standard fields have a restriction in the database.
For example: name | varchar | 32
Have you tried editing the size/length value for the field in the database?
-
- Forum Members
- Posts: 127
- Joined: Fri Nov 28, 2008 10:28 pm
Re: CTLModuleMaker - length of name field
The work around it is make new field name title and then you hide Alias in your template (en_US.php) rename 'Name to Alias. Its auto fills in the Alias filld in automatic anyway.
$lang["module_name"] = "Name";
>>
$lang["module_name"] = "Name to Alias";
then you go you edit_*****.tpl
remove
<div class="pageoverflow">
<p class="pagetext">{$item->alias->Label()} :</p>
<p class="pageinput">{$item->alias}</p>
</div>
Hope this helps
sorry if my writing to crap.,
Andrew
$lang["module_name"] = "Name";
>>
$lang["module_name"] = "Name to Alias";
then you go you edit_*****.tpl
remove
<div class="pageoverflow">
<p class="pagetext">{$item->alias->Label()} :</p>
<p class="pageinput">{$item->alias}</p>
</div>
Hope this helps
sorry if my writing to crap.,
Andrew