Page 1 of 1

[SOLVED]Show article title in every page

Posted: Fri Mar 28, 2014 2:12 pm
by polinter
Fisrt of all I want say sorry for my bad english, I'm Italian.
Hi everybody, I'm new and i would like learn somthing more about this incredible CMS.
This is my issue: i need to show the title of the last n articles in a right box. How can I do that?

Re: Show article title in every page

Posted: Fri Mar 28, 2014 3:46 pm
by Jo Morg
Reading the module Help would give you clues on how to accomplish most actions if not all:
News Help wrote:How do I use it?

The easiest way to use it is with the {news} wrapper tag (wraps the module in a tag, to simplify the syntax). This will insert the module into your template or page anywhere you wish, and display news items. The code would look something like: {news number='5'}
Number will be the number of items you wish to show.

Re: Show article title in every page

Posted: Sat Mar 29, 2014 3:39 pm
by polinter
I wrote this in Archive View Template:

{* archive template *}
{if isset($archivelist)}
<ul class="titoli">
{foreach from=$items item=entry}
<li><a href="{$entry->detail_url}" title="{$entry->title|escape:htmlall}">{$entry->title|escape}</a></li>
{/foreach}
</ul>
{/if}

I put this template in the "Edit Template" with this script:


{CGBlog action="archive" archivetemplate="Sample"}

Everythings works, but when i click on a Title, in the content appears the article, but in the right box (where there is a Title list) the title list disappears.

How can I have a title list in every page end when in the content there is an article?

Re: Show article title in every page

Posted: Sun Mar 30, 2014 7:39 pm
by Dr.CSS
I would use a summary template to do that, remove all but the title link, not an archive template and not putting the call in another of the summary template, when clicking on title link it takes you to detail view/template that doesn't have that call in it...

Re: Show article title in every page

Posted: Mon Mar 31, 2014 8:51 am
by polinter
Dr.CSS wrote:I would use a summary template to do that, remove all but the title link, not an archive template and not putting the call in another of the summary template, when clicking on title link it takes you to detail view/template that doesn't have that call in it...
You solved my problem, thank you very much.