Okay well boy did I do it. In an attempt to automagically output some
container content, I put the code below in a primary DHTML webskin...
The request.cscd.home check in the code below is new to "prevent" the
issue I describe below...
<!--- Dynamically Generate Containers --->
<!--- get the ancestors of the current node from the tree
--->
<cfset qNodeAncestors =
application.factory.oTree.getAncestors(objectid=request.navid,
bIncludeSelf="true") />
<!--- filter query to nodes under the home node, 2 levels
deep --->
<cfquery dbtype="query" name="qNodeList" maxrows="2">
SELECT * FROM qNodeAncestors
WHERE nLevel > 1
ORDER BY nLevel
</cfquery>
<!--- This display method is Not used on home so we should
have atleast 1 record --->
<cfif qNodeList.recordcount GT 0>
<!--- create a sidebar container dynamically based on
the second level node name --->
<cfif len(qNodeList.ObjectName[1]) AND
request.cscd.home EQ "home">
<cfset request.dynCon1Name = ReplaceNoCase
(qNodeList.ObjectName[1], " ","-","ALL")>
<con:container
label="#stobj.objectID#_#request.dynCon1Name#-sidebar"
defaultMirrorLabel="#request.dynCon1Name#-sidebar">
<cfif len(qNodeList.ObjectName[2]) AND
request.cscd.home EQ "home">
<cfset request.dynCon2Name = request.dynCon1Name &
"-" & ReplaceNoCase(qNodeList.ObjectName[2], " ","-","ALL")>
<con:container
label="#stobj.objectID#_#request.dynCon2Name#-sidebar"
defaultMirrorLabel="#request.dynCon2Name#-sidebar">
</cfif>
</cfif>
</cfif>
This has been working beautifully... but then.... we decided to have
multiple versions of our site... Japanse / Chinese..
I opted for home nodes at the root level and control what site gets
loaded with a request var..
that was working beautifully... but then...
I was looking to update an old container that our DMNews types use for
the boilerplate message and..
OMG..
I have exploed my container tables...
dbo.container: 142008 records
dbo.refContainers: 72939
It appears that the japanese characters used in the nodes for:
<cfset request.dynCon1Name = ReplaceNoCase(qNodeList.ObjectName[1], "
","-","ALL")>
<con:container label="#stobj.objectID#_#request.dynCon1Name#-sidebar"
defaultMirrorLabel="#request.dynCon1Name#-sidebar">
are created multiple times.. as in every time...
I have since put the home node check above and do dynamic containers
only on the English site, but container management is now impossible
from the webtop due to the number of records.
any idea how I can clean up these tables programatically? 142008
records is not something I want to clean up by hand.
Help me.
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---