Does anyone happen to know how to call a page with an html (or javascript or php or…) link that, say, puts a template file and a text file together as the resulting web page? I’m sure there’s an easy way to do this, probably with php, but the last hour or so of looking has only taught me that I’m probably not looking up the right things. Basically, I’m trying to find a more dynamic yet simple way of doing my recipes. I want the recipes to be in plain old text files for that ‘printer friendly’ option. And I want a template file to format that text file (I have no css skills yet either, and I do NOT want to use MySQL). And I want to be able to create one index page of recipe links that will do this kind of thing.

What I’d like to avoid is having to create a template page full of server side includes for each recipe, that basically just includes the recipe text files as it includes everything else. This WOULD work, except it would be great not to have to create separate html files and to just dynamically generate the end html page result. Does this make any sense? *grin* Well, maybe I’ll go back to google and see what else I can come up with. Maybe there’s another solution that does the same thing that I haven’t touched on yet. *deep breath* I just have this feeling that I’m probably missing something. (Like maybe my frontal lobe – seen it anywhere?)

ADDENDUM: I’ve figured out how to do it with php! Assign the file name to a variable in the link and include the file as the variable in the template. Cool! The only thing is that the resulting output isn’t recognizing hard returns as line breaks and I want it to do that – the text is all running together. Looks like more googling for me! ADDENDUM #2: I think I’ll just insert the line break codes into the text files themselves (since there aren’t SO many yet) and create just a very plain template for the ‘printer friendly’ version. That will be perfect! And if I ever need completely stripped text files for these recipes, well, that’s why god created macros! 😉 Oh, happy, happy day!

This entry was posted in General. Bookmark the permalink.

Leave a Reply