ok, like help!
Is anyone familiar with MyMakeTree? Great script! utterly fantastic... it uses <ul>
for indentation...
Does anyone know how the following code might be adapted to indent with spaces instead
of with <ul> in case you can't tell, I've made an attempt myself and this is the
closest I've gotten.
<!---
Custom Tag : MyMakeTree.cfm Author : Steve Majewski
Date : 08/10/1999 Attributes:
---->
<!---
Assign attributes passed to local variables. Use the CFPARAM statements to set default
values if attributes are not passed.
---->
<CFPARAM name="ParentItemID" default="0">
<CFIF IsDefined("Attributes.ParentItemID")>
<CFSET ParentItemID = Attributes.ParentItemID>
</CFIF>
<CFPARAM name="OrderBy" default="Category_Name">
<CFIF IsDefined("Attributes.OrderBy")>
<CFSET OrderBy = Attributes.OrderBy >
</CFIF>
<!---
Query all items with ParentItemID equal to the current ParentItemID. All top level
items should have a ParentItemID of zero (0).
---->
<CFQUERY name="GetCurrentItems" datasource="s4s_seniorindex">
SELECT * FROM Categories
WHERE Parent_ID = #ParentItemID#
ORDER BY #OrderBy#;
</CFQUERY>
<!---
Loop through the query and display the item information.
---->
<cfparam name='indenttext' default='--'>
<CFLOOP query="GetCurrentItems">
<CFOUTPUT>
<cfloop from=1 to=#parent_id# index=parent_id> </cfloop> <cfif mode eq
3>(*)</cfif> #GetCurrentItems.Category_Name#<br>
</CFOUTPUT>
<!---
Query items with ParentItemID equal to the current ItemID.
---->
<CFQUERY name="CheckForChild" datasource="s4s_seniorindex">
SELECT * FROM Categories
WHERE Parent_ID = #GetCurrentItems.CatID#;
</CFQUERY>
<!---
If CheckForChild returned records, then recurse sending the current ItemID as the
ParentItemID.
---->
<CFIF CheckForChild.RecordCount gt 0 >
<CF_MYMAKETREE parentitemid="#GetCurrentItems.CatID#" orderby="#OrderBy#">
</CFIF>
</CFLOOP>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com