Is there a way to delete a field definition. I created one to test and now I can't delete. Also if you click on edit, it will not give you the option to edit the Type.
I can see that there is a action.admin_deletefielddef.php in the new module directory, but where is the icon to allow you to delete.
[SOLVED] News Module Field Definition
[SOLVED] News Module Field Definition
Last edited by giggler on Thu Nov 22, 2007 6:38 am, edited 1 time in total.
Re: News Module Field Definition
Ok, I figured out how to add the delete icon. in function.admin_customfieldstab.php
find
To add the type dropdown:
find:
find
add above that (or below):
$onerow->editlink = $this->CreateLink($id, 'admin_editfielddef', $returnid, $gCms->variables['admintheme']->DisplayImage('icons/system/edit.gif', $this->Lang('edit'),'','','systemicon'), array('fdid'=>$row['id']));
$onerow->deletelink = $this->CreateLink($id, 'admin_deletefielddef', $returnid, $gCms->variables['admintheme']->DisplayImage('icons/system/delete.gif', $this->Lang('delete'),'','','systemicon'), array('fdid'=>$row['id']));
To add the type dropdown:
find:
replace with:$smarty->assign('showinputtype', false);
$smarty->assign('inputtype', $this->CreateInputHidden($id, 'type', $type));
Was there a reason why that was hidden by default? It would be nice if there's field definition for pages.$smarty->assign('showinputtype', true);
$smarty->assign('inputtype', $this->GetTypesDropdown($id, 'type', $type));
Last edited by giggler on Thu Nov 22, 2007 6:39 am, edited 1 time in total.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: [SOLVED] News Module Field Definition
Because deleting field definitions should go through and delete that field from all news articles, and if it is a file type field remove the file, otherwise the data is orphaned. Similarly with changing the type there is a potential to orphan the data.
This functionality wasn't complete yet, so thererfore the edit and delete field definition options were left out.
This functionality wasn't complete yet, so thererfore the edit and delete field definition options were left out.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: [SOLVED] News Module Field Definition
Good to know - this Field Definition option will be great for Pages also.

