One of the biggest improvements with FC 4.0 is formtools. They speed up development because you can leave out the edit method and the edit handler will be generated automatically. That's how the core news item works.
The formtool metadata on the properties (ftXXX="...") allows you to specify the wizard step (ftWizardStep), step section (ftFieldSet), order (ftSeq), label (ftLabel), and input type (ftType) for editing that particular property. FarCry will use that to create, format, and validate in the edit page. There are input types that automatically create 1-1 or 1-many lookup fields on other content types, validate email, or use the tinyMCE editor. If you absolutely have to build your own edit handler, I would say that the dmHTML files will be the closest to dmNews. You won't have to make as many changes to get what you want. Blair On 7/19/07, Cornholio <[EMAIL PROTECTED]> wrote: > > > Thanks Blair! > > This worked fine, no problems. > > But i got into a new problem, editing existing and writing new News > articles. According to the links in the previous post, everythig is > ok, but for content that is not dynamic. News are dynamic content in > Farcry and there is nothing about adding and editing Dynamic content. > Which of the existing _dmXXX templates should i use in the (ex.) > <cfinclude template="../system/_dmnavigation/edit.cfm"> tag in the > functions in my custom types to add or edit content, or at least how > can i combine those templates or call the existing ones?? > > Cheers > Darko > > On Jul 18, 2:37 am, "Blair McKenzie" <[EMAIL PROTECTED]> wrote: > > You will need to extend the dmNews component and provide metadata for > the > > extra columns. This > > tutorial< > http://docs.farcrycms.org:8080/confluence/display/FCDEV30/Extended+Co... > >was > > written for > > 3.x but most of it is still applicable - you'll just need to check that > the > > various package paths are correct. The FarCry Wiki also has more detail > > about the property > > metadata< > http://docs.farcrycms.org:8080/confluence/display/FCDEV40/Form+Tool+P... > >required. > > > > Cheers > > Blair > > > > On 7/17/07, Cornholio <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi! > > > > > I needed to migrate data from another database into Farcry's database > > > and i also had to alter some tables and insert some new > > > > > columns (ex. dmNews has two extra columns: section & edition, dmLink > > > has new column: section, New table created: edition...). The news > > > display is ok, no problems occuring, but in the admin section i got > > > some problems i couldn't solve. > > > > > In Admin panel -> Content -> Dynamic Content -> News, i can't see the > > > new column values which i have set to be displayed in the news table > > > view. Also, i can't edit a news item (Create Draft Object), it says > > > something like this: > > > > > > ---------------------------------------------------------------------------------------- > > > Error Executing Database Query. > > > Field 'edition' doesn't have a default value > > > > > The error occurred in C:\farcry4\core\packages\fourq\gateway > > > \DBGateway.cfc: line 87 > > > Called from C:\farcry4\core\packages\fourq\fourq.cfc: line 324 > > > Called from C:\farcry4\core\packages\types\types.cfc: line 388 > > > Called from C:\farcry4\core\tags\navajo\createDraftObject.cfm: line 38 > > > Called from C:\farcry4\core\admin\navajo\createDraftObject.cfm: line 7 > > > Called from C:\farcry4\core\packages\fourq\gateway\DBGateway.cfc: line > > > 87 > > > Called from C:\farcry4\core\packages\fourq\fourq.cfc: line 324 > > > Called from C:\farcry4\core\packages\types\types.cfc: line 388 > > > Called from C:\farcry4\core\tags\navajo\createDraftObject.cfm: line 38 > > > Called from C:\farcry4\core\admin\navajo\createDraftObject.cfm: line 7 > > > > > 85 : , > #sqlArray[i].value# > > > 86 : </cfif> > > > 87 : </cfloop> > > > 88 : ) > > > 89 : </cfquery> > > > > > > ---------------------------------------------------------------------------------------- > > > > > I am still trying to figure out where to put these columns in the code > > > to get rid of these errors. Any help would be > > > > > appreciated. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~---
