On Nov 8, 6:26 am, coldbama <[EMAIL PROTECTED]> wrote: > Where exactly should I put the form codes? In the page itself or > project webskin or ?? I tried different ways with no success.
Nearly everything should be in a webskin, these are the VIEW in the MVC of FarCry development. FarCry is centred around objects and views are *always* rendered in the context of an object. This is different from other frameworks where the VIEW and MODEL are kind-of wired together by the controller. Framework mumbo-jumbo aside, it means you always start by thinking about what type of object you are going to be working with to render your view. EG, if you have a blog post content type (say farBlogPost) and want to provide an edit handler to update a post, you would look to have a webskin that is in the farBlogPost folder (./webskin/farblogpost). By the way FarCry automatically builds this form but if you wanted to override it you would start by creating a template called edit.cfm (./ webskin/farblogpost/edit.cfm) EG, if you just want to display the blogpost you would create a webskin like ./webskin/farblogpost/displaypagestandard.cfm And inside there you would add all the HTML needed to render your page. EG, if you wanted a comment form embedded in your blog post to collect comments from visitors you might start by creating a comment content type (farBlogComment) -- because you need somewhere to persist or store comments. Rather than trying to build a view of the blog post you would instead build a view for the comment type (farBlogComment), and then embed that view in the blog post detail view. ie. you would call the comment edit form from within the blog displaypagestandard.cfm view. In all examples, the view is always being called in the context of a specific content type. You can look through this specific example by downloading the NearCry blogging app at: http://www.farcrycore.org/builds Hope that helps, geoff http://www.daemon.com.au/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
