I found a solution for my problem and am posting for the archives. I know
this is easy stuff for most but it took me a few think of it.
I let word create the sub directories with *_files names (Option in word).
Then I build my pages based on the *.htm files in the directory structure.
When I see sub directory with the same name and *_files as the html file I
know I have supporting files to deal with for that page.
I then parse out the path of the MS Word HTML document to get the various
pieces of the string I need to use <cfdirectory> and <cffile> and the path
replaces.
>From there I use <cffile> read in the original document saved by the end
user with MS word and just replace the paths in the variable created with
<cffile> and use writeoutput() to include it in my current web page. Seems
to work well.
I also set the user up with a web folder in explorer on her PC so she can
save directly from MS word to the branch on the website. This seemed to
make things very easy for the end user.
Thanks
David
<cfoutput><cfdirectory action="LIST" directory="#cTourPath#"
name="qTest4picture" filter="#cTourSub#"></cfoutput>
<!--- Testing for a subdirectory created by word that has supporting files
for page --->
<cfif qTest4picture.recordcount EQ 1 >
<cfoutput>
<cffile action="READ" file="#cFullTourPath#" variable="TourPage" >
<cfscript>
cReplPath = replacenocase(replacenocase(url.intour,".htm","_files/"),"
","%20","ALL") ;
cTestPath = "./" & replacenocase(left(cTourName,len(cTourName) - 1),"
","%20","all") & "_files/" ;
TourPage = replacenocase(TourPage,cTestPath,cReplPath,"ALL") ;
writeoutput(Tourpage) ;
</cfscript>
</cfoutput>
<cfelse>
<table width="98%"><tr><td><cfinclude
template=#url.intour#></td></tr></table>
</cfif>
----- Original Message -----
From: "Richard Meredith-Hardy" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 2:23 AM
Subject: Re: MS word HTML page with a picture
> DirectLoad does all this for you.... and more
>
> http://www.flymicro.com/cf/directload
>
> As for file naming, it names all the associated files
> my_file_image_001.jpg etc. and puts them by default in the same
> directory as the html file. This may not be very tidy but it does mean
> there can't be conflicts with similarly named files in another directory
> and a common images/ directory.
>
>
> David Green wrote:
> >
> > Hello list, Thanks all for the good material on this list!
> >
> > I am not sure how to ask this question.
> >
> > Is there a way to control the relative calling directory information
> > when using cfinclude? "I know questions does not make sense"
> >
> > My problem is am including pages that are created in word and saved to
> > HTML then uploaded by a user to a user defined directory structure on
> > the server. I then use cfdirectory and cfinclude to make pages with
> > links and display the pages with footers and back grounds ect. This
> > all works great for pages without a pictures user is able to build and
> > control there site with just word and some file management. Till they
> > add a picture to the document created in word
> >
> > A page created/saved by MS word as HTML that includes a picture looks
> > for a sub directory of (WebPageName_files) in the directory that the MS
> > word page is in. My problem is that because am using cfinclude I am
> > not in the directory that the MS word page is in so my relative
> > directory path is not what was created by the word when the document was
> > saved.
> >
> > The path to the image in the document created word will be something
> > like "./tour/testpage_files/picture.jpg" but because of the cfinclude
> > am not in the directory with a subdirectory of tour. Am in the
> > directory with my cfm pages (/webname/cf_pages ) and the page is looking
> > here for the subdirectory of tour and the path to the image.
> >
> > Editing the path in the word after saving it html document is not an
> > option. My user would not a clue on how to edit the code.
> >
> > So my question has anybody done something like this using word and
> > cfinclude and how did you handle the file paths created by word?
> >
> > I am guessing some how I need to create a web page dynamically in the
> > directory that the word doc is in and call it directly with maybe
> > a cflocation or java script?
> >
> > Thanks the any help, Sorry if this makes no sense.
> > David
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists