Tiens, fijntje voor Free: <cfimport>

Tiens, fijntje voor Free: <cfimport> met het prefix-attribuut ingevuld. Voorbeeld:

een file “table.cfm” met daarin iets als

<cfparam name=“attributes.bgcolor” type=“string” default=“”>
<cfparam name=“attributes.text” type=“string” default=“”>

<cfoutput>
  <table bgcolor=”#attributes.bgcolor#>
    <tr>
      <td>
#attributes.text#
</td>
    </tr>

  </table>
</cfoutput>

En die dan in een directory steken als c:\cftags\, en inladen als

<cfimport prefix=”my” taglib=”c:\cftags”>

En die dan gebruiken als volgt:

<my:table bgcolor=”#ffeeee” text=”yow”>

Wijs!!

Één reactie op “Tiens, fijntje voor Free: <cfimport>”

Reacties zijn gesloten.