Dotclear

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

Annonce

13 février 2024 Sortie de Dotclear 2.29

#1 2021-02-20 06:07:10

bearnn
Membre
Inscription : 2021-02-20

Is it possible to set the article to the top

Hello, is there Top articles similar to WP at dotclear? I looked for attributes and plugins, but I didn’t find them. Please help. Thank you very much!

Hors ligne

#2 2021-02-20 07:05:53

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

Re : Is it possible to set the article to the top

You could mark the posts as selected (check the "selected entry" chekbox in post view or choose several posts in posts list and apply the "Mark as selected" option)

Then you can use the "Selected entries" widget to list these posts in your sidebar.

However, if you need to display selected posts first on your home page, you will need to make some changes to your home.html file, and the way to do it depends on the theme you are using.

Hors ligne

#3 2021-02-20 13:53:04

bearnn
Membre
Inscription : 2021-02-20

Re : Is it possible to set the article to the top

Philippe a écrit :

You could mark the posts as selected (check the "selected entry" chekbox in post view or choose several posts in posts list and apply the "Mark as selected" option)

Then you can use the "Selected entries" widget to list these posts in your sidebar.

However, if you need to display selected posts first on your home page, you will need to make some changes to your home.html file, and the way to do it depends on the theme you are using.


"selected entry" can only be used in widgets,
I can only try to change the home.html file to achieve,
thank you very much for your suggestions!

Hors ligne

#4 2021-02-20 14:25:50

pierrevg
Membre
Inscription : 2005-04-13
Site Web

Re : Is it possible to set the article to the top

Vous pouvez vous inspirer du code du thème demo#1 (https://themes.dotaddict.org/galerie-dc2/details/demo1) et de son __layout.html, lignes 73 à 103 pour la partie selected, et suivantes si vous voulez également afficher des posts non sélectionnés.
Comme on ne sait rien du thème que vous utilisez et de votre url, vous faire une réponse plus précise est chronophage pour pas grand chose, hein ?

Hors ligne

#5 2021-02-21 05:07:47

bearnn
Membre
Inscription : 2021-02-20

Re : Is it possible to set the article to the top

pierrevg a écrit :

Vous pouvez vous inspirer du code du thème demo#1 (https://themes.dotaddict.org/galerie-dc2/details/demo1) et de son __layout.html, lignes 73 à 103 pour la partie selected, et suivantes si vous voulez également afficher des posts non sélectionnés.
Comme on ne sait rien du thème que vous utilisez et de votre url, vous faire une réponse plus précise est chronophage pour pas grand chose, hein ?

Thank you for your help.  I use theme is dcResponsive. I tried demo#1. it marked on the top with "selected entry" method. This can also meet my needs. I will try to modify __layout.html , thank you very much!

Hors ligne

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

Pied de page des forums

Sites map