Dotclear

Vous n'êtes pas identifié(e).

Annonce

#1 2014-09-07 11:11:30

jarekb
Membre
Inscription : 2014-09-06

How to avoid showing recent articles in sidebar [SOLVED]

Hello,

I am trying to remove "Recent articles" from sidebar but I can't find where this information is stored in template files. I am using Chestnut template.

Any help appreciated.

Dernière modification par jarekb (2014-09-25 16:24:06)

Hors ligne

#2 2014-09-07 11:44:23

Jean-Michel
Modérateur à ailes d'ange
Lieu : Paris
Inscription : 2006-08-22
Site Web

Re : How to avoid showing recent articles in sidebar [SOLVED]

Hello.

You can go to widget´s page in your admin. And move the widget "Recents posts" as you like.

Hors ligne

#3 2014-09-08 15:49:55

jarekb
Membre
Inscription : 2014-09-06

Re : How to avoid showing recent articles in sidebar [SOLVED]

Hello,

Unfortunately there's no such widget appearing on any of my lists.

Probably this function is initiated by some template entry. Still looking for this but with no result.

Hors ligne

#4 2014-09-08 16:05:13

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : How to avoid showing recent articles in sidebar [SOLVED]

There are two ways to include recent posts widget :

1) in dotclear's admin, choose Presentation widgets in blog menu and drag your widget in any of the three sidebars

2) use a widget tag in any of your theme template file (for example yourtheme/tpl/home.html) by inserting

<tpl:Widget id="lastposts">
  <setting name="Setting name">Setting value</setting>
  ...
</tpl:Widget>

in home.html file where you want to display the widget

To see all widgets possible settings values, check the help section when on Presentation widgets page ;)

PS : Recent posts widget is called Last entries in english version

Hors ligne

#5 2014-09-08 16:18:10

Jean-Michel
Modérateur à ailes d'ange
Lieu : Paris
Inscription : 2006-08-22
Site Web

Re : How to avoid showing recent articles in sidebar [SOLVED]

Philippe a écrit :

PS : Recent posts widget is called Last entries in english version

Oups… Sorry ^^

Hors ligne

#6 2014-09-10 04:34:18

jarekb
Membre
Inscription : 2014-09-06

Re : How to avoid showing recent articles in sidebar [SOLVED]

This "last post ever added", as I call it, appears in sidebar, so the solution lays probably in sidebar.tpl, I guess. I'll try once again this Friday (more time to search).

Hors ligne

#7 2014-09-12 06:11:54

jarekb
Membre
Inscription : 2014-09-06

Re : How to avoid showing recent articles in sidebar [SOLVED]

Finally I've found the answer. The beast was sitting in "sidebar.html"

To avoid showing last entry with its image in sidebar, we need to remove those lines:

        <div class="last-post">
            <h2 class="archive-bt">{{tpl:lang Recent articles}}<a href="{{tpl:BlogArchiveURL}}">{{tpl:lang Archives}}</a></h2>
            </tpl:EntriesHeader>
              <tpl:EntryIf first="1">
                <div class="post" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}">
                    {{tpl:EntryFirstImage size="sq" class="square left" with_category="1"}}
                    <h3 class="latest-news-article"><a href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a></h3>
                    <!-- # Entry -->
                    <tpl:EntryIf extended="1">
                    <div class="post-content">{{tpl:EntryExcerpt encode_html="1" remove_html="1" cut_string="80"}}...</div>
                    </tpl:EntryIf>
                    <tpl:EntryIf extended="0">
                    <div class="post-content">{{tpl:EntryContent encode_html="1" remove_html="1" cut_string="80"}}...</div>
                    </tpl:EntryIf>
                </div>

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map