Skip to main content
Participant
February 11, 2008
Question

cfimport for custom tags + repeated content

  • February 11, 2008
  • 1 reply
  • 242 views
Ok, I setup my cfimport like so:

<cfimport taglib="cftags" prefix="tags">

Then I called the tag:

<tags:test />

so the custom tag comes from a page called test.cfm which is in the folder called cftags. Inside of that file there are only 2 words. "Test Data" but when I view the page via a web browser it repeats the text twice. "Test Data Test Data. Has anyone seen this before? If so let me know how i can fix it please.
    This topic has been closed for replies.

    1 reply

    Inspiring
    February 11, 2008
    that's a *paired* custom tag which executes *twice*: once for the
    opening tag and once for the closing tag.
    to make it execute only once, use a cfif inside the tag, i.e.
    <cfif thistag.executionmode is "start">
    ...code t execute here...
    <cfelse>
    </cfif>

    hth


    ---
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com