CGBlog - Help needed - A couple of things

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Peciura

Re: CGBlog - Help needed - A couple of things

Post 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").
darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: CGBlog - Help needed - A couple of things

Post 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
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: CGBlog - Help needed - A couple of things

Post 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  :-[
CMS Made Simple! Best CMS! :)
Peciura

Re: CGBlog - Help needed - A couple of things

Post by Peciura »

Tell what you have already done, step by step. Also give link to page.
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: CGBlog - Help needed - A couple of things

Post 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  ???
CMS Made Simple! Best CMS! :)
Peciura

Re: CGBlog - Help needed - A couple of things

Post 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}
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: CGBlog - Help needed - A couple of things

Post 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   :)
Last edited by requish on Thu Apr 15, 2010 10:01 am, edited 1 time in total.
CMS Made Simple! Best CMS! :)
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm
Location: Florida

Re: CGBlog - Help needed - A couple of things

Post 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}
Post Reply

Return to “Modules/Add-Ons”