I'm using a html-editor on one cfm-page, and saving the text in a database:
--mytext written i the html-editor ----------------------
Nunc libero ligula volutpat ac aliquet id laoreet ac lacus.
[peopleoutofoffice]
In dictum tincidunt turpis. Morbi sodales, justo ut posuere viverra
, mi turpis egestas nunc, ac consequat leo elit vitae pede.
---------------------------------------------------------
And showing the text entered in the editor on an other page.
Expand|Select|Wrap|Line Numbers
- <!-- viewcontent.cfm -->
- <cfquery name="pagecontent" datasource="myDB">
- Select id, mytext from contenttable
- Where id = 5
- </cfquery>
- <cfoutput query="pagecontent">#mytext#</cfoutput>
But, that i want to do is replacing the string; [peopleoutofoffice] in #mytest# with the result of an other cfm template, like this:
Expand|Select|Wrap|Line Numbers
- <CFOUTPUT>#replace(mytext,"[peopleoutofoffice]", GetOutOfOffice.cfm)#</CFOUTPUT>
- <!-- GetOutOfOffice.cfm -->
- <cfquery name="OutOfOffice" datasource="myDB">
- Select firstname, surname, status from persontable
- Where status is "out"
- </cfquery>
- <table>
- <tr>
- <td>The following people is out of office</td>
- </tr>
- <cfoutput query="OutOfOffice">
- <tr>
- <td>#firstname# #surname#</td>
- </tr>
- </cfoutput>
- </table>
How do i solve this problem?