AboutBlogContact
Frontend EngineeringOctober 10, 1999 2 min read 113Updated: June 22, 2026

Componentizing the Web: ColdFusion 4 Custom Tags (1999)

AunimedaAunimeda
📋 Table of Contents

Componentizing the Web: ColdFusion 4 Custom Tags

ColdFusion 4.0 (now by Allaire!) is taking the enterprise world by storm. While PHP developers are struggling with include files and ASP developers are getting lost in "spaghetti" code, CFML developers have a secret weapon: <cf_customtag>.

Creating a Reusable Component

Instead of writing the same HTML table logic over and over, you can wrap it in a custom tag. Save a file as my_table.cfm in your customtags directory.

<!--- my_table.cfm --->
<cfif thisTag.executionMode is "start">
    <table border="1" cellpadding="5">
        <tr><th><cfoutput>#attributes.title#</cfoutput></th></tr>
        <tr><td>
<cfelse>
        </td></tr>
    </table>
</cfif>

Using the Tag

Now, in your main page, you can call it just like a built-in ColdFusion tag.

<cf_my_table title="User List">
    <ul>
        <li>Admin</li>
        <li>Editor</li>
        <li>Viewer</li>
    </ul>
</cf_my_table>

Why This is Revolutionary

Custom tags have access to the caller scope, meaning they can read and write variables in the page that called them. They can also have nested "child" tags. This is essentially "Web Components" fifteen years early.

If you're building a large-scale portal, stop thinking in pages and start thinking in tags. Your maintenance team will thank you when the client asks to change the border color on 500 different tables.


Aunimeda builds modern web frontends - from single-page applications to complex multi-locale sites.

Contact us to discuss your frontend project. See also: Web Development, Corporate Website Development

Read Also

Polymer and Web Components: Diving into Shadow DOM (2014)aunimeda
Frontend Engineering

Polymer and Web Components: Diving into Shadow DOM (2014)

Google's Polymer library is bringing the future of the web to today. Let's explore how Shadow DOM provides true encapsulation for our components.

Next.js 13/14: Server Actions and the New App Router (2023)aunimeda
Frontend Engineering

Next.js 13/14: Server Actions and the New App Router (2023)

React is coming full circle. In 2023, Next.js Server Actions are bringing back the simplicity of PHP and Ruby on Rails with modern React components.

React Server Components: Decoding the Wire Format (2023)aunimeda
Frontend Engineering

React Server Components: Decoding the Wire Format (2023)

RSC is finally stable in Next.js 13.4. But what's actually happening in that .rsc stream? Let's decode the secret language of the server-client bridge.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

Web Development

Get Consultation All articles