Page 2 of 2

Re: CGBlog - Help needed - A couple of things

Posted: Tue Dec 01, 2009 10:37 pm
by Peciura
Maybe it's due to internal pretty urls turned on.. don't know.
Pretty ?... I am not using pretty urls :) Try this one.

Code: Select all

{foreach from=$entry->categories item='one_category'}
{capture assign='urlparam'}?&category={$one_category.name}{/capture}
{cms_selflink page='dynamic_categories' urlparam=$urlparam text=$one_category.name}<br/>
{/foreach}
Also, I'm not sure why do you use l 'detailpage=$pagealias' - is this mandatory or not?
It is not mandatory.  Variable "$pagealias" outputs alias of the same page it is placed on (that is "dynamic_categories").

Re: CGBlog - Help needed - A couple of things

Posted: Tue Dec 01, 2009 10:46 pm
by darconny
Hey this code works! Thanks  :)

Now I just have to hide the page "dynamic_categories" i.e. to not show in the menu.

regards
Darko

Re: CGBlog - Help needed - A couple of things

Posted: Wed Apr 14, 2010 1:10 pm
by requish
I tried your methods and none worked. I have mod_rewrite in cms. still no list of categories. and how it showed the link does not work. HELP  :-[

Re: CGBlog - Help needed - A couple of things

Posted: Wed Apr 14, 2010 1:49 pm
by Peciura
Tell what you have already done, step by step. Also give link to page.

Re: CGBlog - Help needed - A couple of things

Posted: Wed Apr 14, 2010 2:07 pm
by requish
Peciura wrote: Tell what you have already done, step by step. Also give link to page.
1st installing the module;
2 typing in text commands module;
3 I added entries to different categories (2),
4 I tried to run a list of categories, but are not shown. I used your methods showed some link, but this did not work, other codes do not function at all.

This code not working.
{foreach from=$entry->categories item='one_category'}
{capture assign='urlparam'}?&category={$one_category.name}{/capture}
{cms_selflink page='blog' urlparam=$urlparam text=$one_category.name}
{/foreach}

extreme not working  ???

Re: CGBlog - Help needed - A couple of things

Posted: Wed Apr 14, 2010 4:44 pm
by Peciura
a.   Smarty code you have mentioned should be in CGBlog detail template.
b.   It creates links to page ('blog') where blog records of one category willl be displayed. Only those categories will be listed that article belongs to . (link name is the same as category)
c.   In order to filter articles by category page 'blog' should have tag

Code: Select all

{CGBlog category=$smarty.get.category detailpage=$pagealias}

Re: CGBlog - Help needed - A couple of things

Posted: Thu Apr 15, 2010 9:59 am
by requish
Peciura wrote: a.   Smarty code you have mentioned should be in CGBlog detail template.
b.   It creates links to page ('blog') where blog records of one category willl be displayed. Only those categories will be listed that article belongs to . (link name is the same as category)
c.   In order to filter articles by category page 'blog' should have tag

Code: Select all

{CGBlog category=$smarty.get.category detailpage=$pagealias}
I have a simpler solution. put this in content/tpl.
{cms_module module="cgblog" action="browsecat"}

just do not know why I had not worked. and may be overlooked.

anyway, thanks for your help   :)

Re: CGBlog - Help needed - A couple of things

Posted: Fri Jun 15, 2012 10:14 pm
by carasmo
I found this for when you have pretty urls on:
Put this in either the summary and/or detail templates in cgblog

{if $entry->categories}
<div class="CGBlogSummaryCategory">
{strip}
{foreach from=$entry->categories item='one_category'}
{foreach from=$categories item='one'}
{if $one_category.name == $one.name}
<a href="{$one.url}" title="{$one.name}">{$one.name}</a>&nbsp;
{/if}
{/foreach}
{/foreach}
{/strip}
</div>
{/if}