Hosted By

Contact Me

Misc Links

OpenNTF BlogSphere LotusGeek CoComment Custom Button

Ads by Google

Welcome to keithstric.com!

I hope you find this site useful in some way or another. I strive to bring you all sorts of geeky information and solutions to your most frustrating of issues with the occasional rant on whatever topic, technical reviews and weblog. You'll also find many products that I've developed and make available for you to use however you like. So, grab a cup of coffee, sit down and visit for a while.

« Performance Tuning keithstric.com... | Home Page| Last Tweak to keithstric.com for today... »

More Tweaks to keithstric.com

12/10/2009 1:25 PM By Keith Strickland

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.


Post A Comment

:-D:-o:-p:-(:-):-\:-|:angry::cool::cry::dontknow::emb::hairout::laugh::rolleyes::whew:;-)

Subscribe to keithstric.com

OpenNTF

Disclaimer

The opinions and ideas posted on keithstric.com are not necessarily the opinions and ideas of my employer. The solutions, techniques and code provided here are not guaranteed or warranted in any way and are free for you to use at your own risk.