This is not a problem specifically with CGBlog, it applies equally to all of the modules in CMSMS.. and comes down to a fundamental thing in how CMSMS works.
In CMSMS you create a page template with a number of areas in them... one of these areas (usually surrounded by a div) is {content} the default content block. You may also create other content blocks, or call modules directly from this page template. For now lets assume that you've added additional content blocks like {content block='left_sidebar'}. This page template controls the layout of each page that uses that template. Your (simplified) page template probably looks like:
Code: Select all
<__html>
<head>
<title>{sitename}</title>
{metadata}
</__body>
<div class="header">...</div>
<div class="main_container">
<div class="sidebar">
{content block='sidebar'}
</div>
</div class="main_content">
{content}
</div>
<div class='clearb'></div>
</div>
<__body>
</__html>
Next you create a page (which has it's own unique alias and page id, and addressable url). specify the template you created above and start filling in content. In your example you want content in the left sidebar to show a list of blog categories, followed by an archive view, followed by a teaser.... by default in this page you probably want to display the latest blog article. so you do something like this:
In the sidebar block:
Code: Select all
{CGBlog action='categorylist'}
{CGBlog action='archive'}
{CGBlog limit=5 summarytemplate='teaser'}
in the main content block
---
So far, so good. You have now generated some content for this page...but that's all that has been done. You have requested that the CGBlog module be called 4 different times, to display four different sets of data (or display the same data 4 different ways). Some of these calls will generate links (either using some of the parameters you specified in the calls, or the settings in the modules) to a detail page, or to a summery view that is somehow filtered. The link generated contains enough information that a page id can somehow be determined, and what subset of data to display. By default the system will use the default content block {content} to display that data when you click on the link.
Again, so far so good. You have clicked on one of the links provided, and because the system found the same page id, and therefore the same template the system finds the content block for the sidebar and parses it, and displays the requested content again. And also, because the URL contained information that could be read by the CGBlog module, the default content block is replaced with content according to the criteria specified in the url and the module preferences. That's it. You have told the system what to display. There is no automatic intelligence telling the system that just because you clicked on a category link, or an archive link that you no longer want to display the sidebar, or portions of the sidebar, or to exclude one certain article from the list, or to display it differently.... that type of behavior cannot be built in because each site will behave differently.
This is where you need to start expanding your knowledge. You need to understand smarty, how it works, and how you can add logic to control the display of certain things. And you also need to understand how CMSMS works a bit better (splitting page templates up and processing the body first, which essentially makes each page template into 3), and also the ramifications of putting certain types of logic into your templates (caching is no longer possible, etc).
Now... for the cheap and easy way of making what you want work I would:
a: Modify your page template to be like this (abridged)
Code: Select all
...
</__body>
{content assign='my_content'}
<div class="header">...</div>
<div class="main_container">
<div class="sidebar">
{content block='sidebar'}
</div>
</div class="main_content">
{$my_content}
</div>
<div class='clearb'></div>
</div>
<__body>
...
Note how {content assign='my_content} is called BEFORE the sidebar. it's output is captured into the smarty variable called {$my_content} and we just display that where we want it.
b: Modify your CGBlog detail template (or whatever other templates where you want to hide the teaser) to add something like
Code: Select all
{assign var='hide_teaser' value=1}
This sets a smarty variable indicating that the teaser stuff should be hidden.
c: In the page template, or the page content, or GCB where you are displaying the teaser list in the sidebar change it to something like:
Code: Select all
{CGBlog action='categorylist'}
{CGblog action='archive'}
{if !isset($hide_teaser)}
{CGBlog limit=5}
{/if}
This simply says, if the hide_teaser variable is not set... then we are clear to display the teaser stuff.
d: Disable caching in that page... and if your calls to CGBlog are in the template, on all pages that use that template.