After setting up my initial site with Expression Engine in an afternoon, I was left with a couple of outstanding bugs that needed to be resolved at a later date. The first of these bugs was the non-appearance of my embedded sidebar template on certain pages. The ‘General Interest’ links in the sidebar are drawn from a weblog which I called featured_links. While they were present and correct on most pages, for some reason on the individual blog entry pages they returned as an empty list.
After several hours of stumbling around through the User Guide I finally discovered the answer in the weblog:entries parameters list. By adding a simple dynamic="off” parameter to the weblog entries tag, the problem was resolved:
{exp:weblog:entries weblog="featured_links" limit="4" dynamic="off”}
The user guide says:
“The weblog display engine sets some parameters dynamically, based on what is in the URL. There are times, however, where you do not want the parameters affected by what the URL contains. To override the dynamic nature of the weblog tag, use dynamic="off".
This is often useful if you want to list entries in a “sidebar” on your site and have them always be the same ones regardless of which page on your site you visit (main page, archives, comments, etc.). By setting dynamic="off" you will ensure that the list is not affected by anything passed in the URL.”
Comments
Next entry: Live Streaming that Works: BBC Wimbledon Coverage
Previous entry: Can a Site be Implemented with Expression Engine in An Afternoon?

Add a Comment
Please allow five minutes between posting comments.