Add New threads to What's new (Widget/Page node)

XF 2.3 Add New threads to What's new (Widget/Page node)

Add-on xenforo 2

Ressources et modules complémentaires pour XenForo 2

Styles xenforo 2

Styles / Thèmes et apparence pour xenforo 2

Templates xenforo 2

Codes pour modifier les templates sur xenforo 2

Section Premium

Add-on et Styles pour membre Premium
Add New threads to What's new (Widget/Page node)

XF 2.3 Add New threads to What's new (Widget/Page node)

Catégorie Catégorie Modifications Templates
Titre du sujet Titre du sujet Add New threads to What's new (Widget\/Page node)
Auteur de la discussion Auteur de la discussion laurent68
Date de début Date de début
Réponses Réponses 2
Affichages Affichages 171
Réaction Réaction 1
Dernier message par Dernier message par alesasss

laurent68

Fondateur

Staff
fondateur
Réputation: 100%
Discussions
4 644
Messages
12 049
Solutions
81
J'aime
7 606
Points
198

1. Create the widget​

Widget definition: New threads
Widget key: whatsNewNewThreads
Title: New threads
Display in positions: (NONE)
Maximum entries: 20(+/-, your choice; I chose 20).
Display style: Standard


2. Create the Page node​

URL portion: new-threads
Title: New threads
Parent node: None
Uncheck display in node list
Navigation selection: What's new
Template HTML:
Vous devez répondre avant de pouvoir voir le contenu des données cachées.
Enable advanced mode

3. Create the Route filters​

Find route: pages/new-threads
Replace with whats-new/threads
[X] Enabled

4. Edit the "New threads" into the What's new wrapper bar​

Open the whats_new_wrapper template
Find:
HTML:
    <!--[XF:links:after_featured]-->

Place this below it:
HTML:
        <a class="{$baseClass} {{ $pageSelected == 'new_threads' ? {$selectedClass} : '' }}" href="{{ link('whats-new/threads') }}" rel="nofollow">New threads</a>
        <!--[XF:links:after_new_threads]-->

5. Add it to the Public navigation​

Add navigation button
Navigation ID
: whatsNewPostsPage
Title: New threads
Parent navigation entry: What's new
Display order: 60 (to be before New posts/After Featured content)
Type: Basic
Link: {{ link('whats-new/threads') }}
[X] Enabled

6. Notes

You can't get the "New thread" button using this method, which is seen on the "New posts" page. Instead, it will be a Bookmark button, which you can choose to hide with CSS. I've decided to keep it so that members can view the 20 newest threads if they bookmark the page.

You also don't get pagination as you would with New posts.

7. Visual​

See New posts and New threads attachments on how it appears in the "What's new" navigation bar as well as how it selects the "New threads" tab underneath that.
 

Pièces jointes

  • new-posts.png
    new-posts.png
    130.9 KB · Affichages: 37
  • new-threads.png
    new-threads.png
    129.7 KB · Affichages: 35
Sujets similaires Les plus vues Voir plus
Retour
Haut Bas