Donut Age: America's Donut Magazine

File under Revised

In describing the new look of Donut Age, I mentioned a revision of the Categories and 'File Under' links. Turns out my first implementation had some problems in it (namely, none of the 'file under' links were working due to capitalization and punctuation discrepancies). I had been building the links by adding the value of the Category attribute onto a site-relative path to make a proper HREF for the category page like so:

File under ^Get(Category)^ ^if(^exists(Category2)^)^ , ^Get(Category2)^ ^if(^exists(Category3)^)^ , ^Get(Category3)^ ^endif^ ^endif.

But like I said, it didn't work. I could have gotten by with making the Names of category agents match the filename of the exported pages, but I thought of a more elegant solution. The new method uses the Tinderbox export code linkTo, which allows me to keep the punctuation and capitalization of the agent title and still link to the web-safe filenames of the pages :

File under ^linkTo(^get(Category)^)^ ^if(^exists(Category2)^)^ , ^linkTo(^get(Category2)^)^ ^if(^exists(Category3)^)^ , ^linkTo(^get(Category3)^)^ ^endif^ ^endif^ .

Anyway, these links seem to work now, and I felt the solution was sufficiently clever to share.