Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Use a variable for the INCLUDES name

Quote Reply
Use a variable for the INCLUDES name
Hi:



According to the help file, you can include a txt file easily, like:



<%include person.txt%>




I want to include a variablly named file (from a field "Comment"), so it would WANT to be something like:



<%include Comment%> (where Comment is "thisfile.txt" or "thatfile.txt")



I also gave this a shot:



<%include Comment.txt%>



but that does not cut it, either.





but that does not work. Is there a way to do this?



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: Nov 20, 2002, 1:36 PM
Quote Reply
Re: [carfac] Use a variable for the INCLUDES name In reply to
http://gossamer-threads.com/...;;page=unread#unread
Quote Reply
Re: [Paul] Use a variable for the INCLUDES name In reply to
Hey Paul!



Thanks a bunch!



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Use a variable for the INCLUDES name In reply to
Hi Paul...



I am not sure that the post you sent me to awnswers my question (at least I cannot get it to work!) Plus, it deals with a field (templete) that I do not know... I do not have Forum.



I want to take a field... lets make it ID to make it easy... and I want to use that to point to specific files to include, like:



<%include <%ID%>.txt%>



I had thosght there was something easy to do like:



<%set $id = <%ID%>%>

<%include $id.txt%>



or something like that...

Thanks!

dave
dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: Nov 21, 2002, 11:54 AM