CTLModuleMaker - length of name field

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
raymondo
Forum Members
Forum Members
Posts: 18
Joined: Sun Feb 11, 2007 10:23 pm

CTLModuleMaker - length of name field

Post by raymondo »

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
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTLModuleMaker - length of name field

Post by klenkes »

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.
raymondo
Forum Members
Forum Members
Posts: 18
Joined: Sun Feb 11, 2007 10:23 pm

Re: CTLModuleMaker - length of name field

Post by raymondo »

klenkes wrote:Try to insert this into your Blueprint.php after the "name" parameter.
Hi,

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
andrewvideo
Forum Members
Forum Members
Posts: 127
Joined: Fri Nov 28, 2008 10:28 pm

Re: CTLModuleMaker - length of name field

Post by andrewvideo »

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
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTLModuleMaker - length of name field

Post by klenkes »

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.
Right! The standard fields that come with a module cannot be edited through 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?
andrewvideo
Forum Members
Forum Members
Posts: 127
Joined: Fri Nov 28, 2008 10:28 pm

Re: CTLModuleMaker - length of name field

Post by andrewvideo »

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
Post Reply

Return to “Modules/Add-Ons”