If you visited the downloads link above since the site change, I guess you noticed that the attachments weren’t available unless you visited the Permalink URL for the download. Well, this has now been fixed.
I noticed this issue when looking at the search results on Nathan Freeman’s website, that his search results showed the attachments in his download documents that were returned by the search. Got to looking on my site and mine was doing the same thing. However, if you visited the /downloads view, the attachments didn’t show up, you only saw the BSAttachments tag. So, I got to digging in the code a little bit to compare the differences between the rendering of all downloads and the search results. There is quite a difference here, but it wasn’t too difficult to figure out.
In the “RenderEngine.Blog” script library, “RenderEngineAllDownloads” function, there are a few arrays there that contain the tags and values of each download document. The tags array contains all the tags that the script will look for and the values array contains all the values for said tags. Looking at this the BSAttachments tag wasn’t listed in the array. However, comparing to the “RenderEngineSearchResults” function these arrays weren’t present at all, but a call to the “RenderEngineProcessTags” function was used instead and this wasn’t in the “RenderEngineAllDownloads” function. So, I replaced the line of code in the “RenderEngineAllDownloads” function for “RenderedText” to read:
RenderedText = RenderedText + RenderEngineProcessTags(“SingleEntryTags”, templateDoc.template_Plink_Download(0))
This seemed to have corrected the issue and now the BSAttachments tag gets processed in the /downloads view.