Michael,
Nothing fancy enough to post in toto!
Each function is just a set of arguments passing in the query result set for the
content and other stuff i'm using to track the page state for example, with a simple
savecontent tag wrapped around the html block, and the savecontent variable returned
at the end. For example for an FAQ block ...
<cffunction name="faq" access="public" output="No" returntype="string">
<cfargument name="thisText" required="Yes" type="query">
<cfargument name="pos" required="Yes" type="numeric">
... etc
<cfsavecontent variable="myText">
<cfinclude template="../buttons/editContent.cfm">
<cfoutput query="thisText">
<cfinclude template="../buttons/editFAQ.cfm">
... (HTML goes here)
</cfoutput>
<cfinclude template="../buttons/addFAQ.cfm">
</cfsavecontent>
<cfreturn myText>
</cffunction>
I'll be modifying the functions within display.cfc somewhat with each project
according to the design requirements, but the point is that the logic and display are
not mixed together. I'm the only developer working on this, so i'm not concerned about
display stuff being within a cfc.
And even if i was, there's always CVS ... or the HTML bit could be in an include.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Dawson, Michael
Sent: Thursday, January 08, 2004 3:01 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] CFC question and HTML in cfc
Nando, can you post your display.cfc on this list? I love the strict,
black-box feel of cfcs, but I have been putting my display in custom
tags. Although it's the "norm", I don't feel that the tags encapsulate
the code very well.
I'd like to see what you have done with your display.cfc.
Thanks
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Nando
Sent: Thursday, January 08, 2004 5:34 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] CFC question and HTML in cfc
As I understand the principle behind the separation of display from
logic, it's to facilitate reuse and maintanablity. I'd say you just do
whatever makes sense to you with that principle in mind. HTML in emails
is certainly a grey area, it's not "display" that's rendered in a
browser, it's code that's still in the midst of being processed by the
server.
I'm using a display.cfc to good effect, and it has lots of HTML in it -
true, it will need to be modified with each project, but I know exactly
where it is and I really like the flexibility that it allows the user of
the CMS, because they can choose what type of content, in what style
they would like, wherever they please on a page.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Andrew Scott
Sent: Thursday, January 08, 2004 4:57 AM
To: [EMAIL PROTECTED]
Subject: [CFCDev] CFC question and HTML in cfc
Ok, need a little advise on this.
In regards to components and functions etc., I am looking at creating a
function to be generic to emails. Now should I create code in the cfc to
format the email or do an include for this.
For example the manager would load the DAO, DAO would be used to get the
information put what about creating an email to send what would be the
options you guys/gals would use. Remembering that HTML formatted emails
are required as well as plain text emails. Some containing images etc.
Regards
Andrew Scott
Technical Consultant
NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205
Phone: 03 9686 0485 - Fax: 03 9699 7976
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool,
Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool,
Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]