5 Let’s add a utility container tag to our library.
<cfif attributes.STATE eq "INACTIVE"><cfreturn></cfif>
<cfimport prefix="hcspdf" taglib="./cf_tags">
<cfset name = "CIMBlogUtilityContainer" />
<cfoutput>
<cfif thisTag.executionMode eq "start" AND attributes.STATE eq "ACTIVE">
<cfelse>
</cfif>
</cfoutput>
We can see that it is empty, it’s value is in the name we give it that surrounds a set of other tags or HTML, in a user-friendly way, on our always destination, project home page.
And the code to invoke that tag from our home page. Note the “Label” attribute and that it serves to identify the block of code only with it’s value not being passed into the tag.
<hcspdf:CIMBlogUtilityContainer STATE="ACTIVE" LABEL="THIS IS A CONTAINER"> </hcspdf:CIMBlogUtilityContainer>
We will go ahead and move our form element code to the utility container. KEY_CONCEPT it is very important to group elements under a logical name. Grouping all the form related elements in one block of code makes it what I like to call “friendly”.
<cimblog:cimblog STATE="ACTIVE">
<hcspdf:CIMBlogUtilityContainer STATE="ACTIVE" LABEL="THIS IS A CONTAINER">
<cimblog:CIMBlogUITextAreaElement
STATE="ACTIVE"
ELEMENT_NAME="FILE_CONTENTS"
ELEMENT_VALUE="FILE_CONTENTS">
DUMMY_TEXT_AREA_TEXT
</cimblog:CIMBlogUITextAreaElement>
<cimblog:CIMBlogUIInputSubmit
STATE="ACTIVE"
ELEMENT_NAME="SUBMIT_PRODUCTION_FORM"
ELEMENT_VALUE="SUBMIT">
</hcspdf:CIMBlogUtilityContainer>
</cimblog:cimblog>