In my own work all my display is generated using the onTap framework's
html library. Generally speaking my conditional logic doesn't appear
within html. Instead the conditional logic may be used to "build"
(x)html which is then displayed. I might have something like this
(pseudocode):
<cfmodule template="#request.tapi.xhtml()#"
return="request.menu">
<div id="menu">
<a id="menuHome" href="home">Home</a>
<a id="menuAdmin" href="admin">Admin</a>
<a id="menuXXX" href="...">XXX</a>
</div>
</cfmodule>
Then in my display template I have
<cfoutput>
#htlib.show(request.menu)#
</cfoutput>
Between these two bits of code if I want to remove the admin link, I
can use something like this
<cfif not member.permitted("admin")>
<cfset htlib.childRemoveById(request.menu,"menuAdmin")>
</cfif>
> Calvin
> Depends, In most cases you can do any conditional logic
> before rendering
> your page but obviously there are exceptions such as when
> the result of the
> condition determines what html is being displayed (and not
> something else
> such as if the user should be redirected or a session
> variable should be
> updated etc.) Some frameworks allow you to determine the
> portions of a page
> being rendered before the page is assembled allowing you
> to decide what
> portions are shown before they are rendered.
> Just my 2pence
> Kola
>> -----Original Message-----
>> From: Calvin Ward [mailto:[EMAIL PROTECTED]
>> Sent: 31 January 2005 13:50
>> To: CF-Talk
>> Subject: RE: better way to code?
>>
>> In light of this discussion, how about lots of cfif
>> statements buried in
>> html...?
s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://macromedia.breezecentral.com/p49777853/
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192887
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54