[SOLVED]Show article title in every page

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
polinter
New Member
New Member
Posts: 5
Joined: Fri Mar 28, 2014 8:21 am

[SOLVED]Show article title in every page

Post 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?
Last edited by polinter on Mon Mar 31, 2014 8:52 am, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Show article title in every page

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
polinter
New Member
New Member
Posts: 5
Joined: Fri Mar 28, 2014 8:21 am

Re: Show article title in every page

Post 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?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Show article title in every page

Post 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...
polinter
New Member
New Member
Posts: 5
Joined: Fri Mar 28, 2014 8:21 am

Re: Show article title in every page

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

Return to “The Lounge”