tracker issue : CF-4198331

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: include operator to allow both attributes as name/value

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/NotWorthEffort

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff ()

Created: 02/10/2017

Components: Language, CFSCRIPT

Versions: 2016,11.0,2018

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: 2018.0.0.303565 /

Priority/Frequency: Normal /

Locale/System: /

Vote Count: 0

This ER is for the include operator to allow both attributes as name/value.

History: The param operator originally only allowed this syntax: param [type] name [=defaultValue]. Later, the param operator was updated to allow all attributes as name/value.

History: The include operator originally only allowed this syntax: include "template". Currently, it also allows this undocumented syntax: include "template" runonce=true|false.

Issue: The addition of attributes to tag operators needs to be done in a well-planned/consistent manner. Param led the way, and include should follow its lead.

Therefore: The include operator should also support this syntax: include template="myinclude.cfm" runonce=true|false

Attachments:

Comments:

Aaron, I'm not sure if there are missing characters in your report, but are you suggesting that cfinclude be supported in script notion as follows: <cfscript> include template="myinclude.cfm" [runonce=true|false] </cfscript> BTW, "runonce" attribute seems to be documented. Pls ref. https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-i/cfinclude.html
Comment by Piyush K.
1193 | March 03, 2017 08:27:05 AM GMT
Hi Piyush, Yes, sorry, I mistakenly didn't include the [ and ]. Yes for, include template="myinclude.cfm" [runonce=true|false]. Examples: include "myinclude.cfm";//works (good) include "myinclude.cfm" runonce=false;//works (good) cfinclude(template="myinclude.cfm", runonce=false);//works (good) include template="myinclude.cfm" runonce=false;//fails (bad) Since the param operator allows all attributes as name/value, the include operator should allow the same for consistency. Yes, runonce attribute is documented on the cfinclude page. But, I was referring to script syntax. I believe [runonce=true|false] wasn't documented. And, at the moment, I can't even find the "include" doc, nor the "param" doc. Any idea where these docs went? Thanks!, -Aaron
Comment by Aaron N.
1194 | August 07, 2017 08:59:51 PM GMT
I just realized you replied back in March. Sorry I didn't see your reply till just now.
Comment by Aaron N.
1195 | August 07, 2017 09:11:03 PM GMT