XF 2.2 Article forum "Preview" thread list change

Wildcat Media

Well-known member
The Preview thread list for an Article forum has blocks 1-, 2- and 4-across.

Is this done using only CSS/LESS, or is it part of a template?

Can it be changed to display only 4-across?

Is there a way to display a custom thread field? (I did not yet check if that data is available on the thread list page yet, so it may not be possible.)
 
The Preview thread list for an Article forum has blocks 1-, 2- and 4-across.

Is this done using only CSS/LESS, or is it part of a template?

Can it be changed to display only 4-across?

Is there a way to display a custom thread field? (I did not yet check if that data is available on the thread list page yet, so it may not be possible.)
Did you find a way to force the 4-across?
 
I hate when that happens. I haven't lost a motherboard or CPU completely, but have had them get unstable and unreliable over time. Lately I've gotten some parts from Micro Center as the price was no different locally as opposed to online. And I can get them the same day.
 
Just wanted to make another attempt at this before exploring an add on/etc.

Has anyone been able to force 4-across for an article forum and can share the method?
 
Did you ever figure this out? I have a use case for it if it is possible.
I never did get around to it, but I thought I've seen another thread around here that showed how to get the information into the template so we could make use of it.

I've actually forgotten what I wanted to use that for, now that I think of it! 😁
 
I never did get around to it, but I thought I've seen another thread around here that showed how to get the information into the template so we could make use of it.

I've actually forgotten what I wanted to use that for, now that I think of it! 😁
LOL. I might actually use Expanded View which does show custom fields. It actually kind of works for my use case (a short story blog with fields for Series, Genre, and a one-line blurb). Ordinarily, I would go to AMS but this is kind of an experiment so I'm trying to see what I can accomplish for free first.
 
LOL. I might actually use Expanded View which does show custom fields. It actually kind of works for my use case (a short story blog with fields for Series, Genre, and a one-line blurb). Ordinarily, I would go to AMS but this is kind of an experiment so I'm trying to see what I can accomplish for free first.
I just found this thread that I was thinking of. Now I finally remembered I wanted to rework a Classified Ads area, and put a couple of the parameters in the view. I would expect the same or similar tactic would work like it does on the following thread:


I haven't tried it yet, but it might get you on the right path...
 
I just found this thread that I was thinking of. Now I finally remembered I wanted to rework a Classified Ads area, and put a couple of the parameters in the view. I would expect the same or similar tactic would work like it does on the following thread:


I haven't tried it yet, but it might get you on the right path...
Thank you much. I was being too specific in my searches, looking for the article view specifically, not just thread views in general. I shall read through this though my first look reminded me of why I pay people to do stuff like this at work now. ;)
 
Okay, so using that and a bit more research, I figured out that you have to add them in the post_article_macros template, under the xf:macro name="article_preview" in the location below (the lines adding the custom are below the /h2 tag). That puts them on the headline below the title like this (highlighted items). Might tinker with the formatting a bit, but that's basically the effect I was after.

1662390180810.png

Code:
                <div class="articlePreview-headline">
                    <h2 class="articlePreview-title">
                        <xf:if is="$thread.discussion_state == 'moderated'">
                            <xf:fa icon="fa-shield" class="structItem-status--moderated" aria-hidden="true" title="{{ phrase('awaiting_approval')|for_attr }}" />
                            <span class="u-srOnly">{{ phrase('awaiting_approval') }}</span>
                        <xf:elseif is="$thread.discussion_state == 'deleted'" />
                            <i class="structItem-status structItem-status--deleted" aria-hidden="true" title="{{ phrase('deleted')|for_attr }}"></i>
                            <span class="u-srOnly">{{ phrase('deleted') }}</span>
                        </xf:if>
                        <xf:if is="$thread.prefix_id">
                            <xf:if is="$forum">
                                <a href="{{ link('forums', $forum, {'prefix_id': $thread.prefix_id}) }}" class="labelLink" rel="nofollow">{{ prefix('thread', $thread, 'html', '') }}</a>
                                <xf:else />
                                {{ prefix('thread', $thread, 'html', '') }}
                            </xf:if>
                        </xf:if>
                        <a href="{$linkUnread}">{$thread.title}</a>
                    </h2>
                        <xf:if is="$thread.custom_fields.StoryGenre">
                            <li>{$thread.custom_fields.getFormattedValue('StoryGenre')}</li>
                        </xf:if>
                        <xf:if is="$thread.custom_fields.Series">
                            <li>{$thread.custom_fields.Series}</li>
                        </xf:if>
                </div>
 
I just found this thread that I was thinking of. Now I finally remembered I wanted to rework a Classified Ads area, and put a couple of the parameters in the view. I would expect the same or similar tactic would work like it does on the following thread:


I haven't tried it yet, but it might get you on the right path...
It did after some work. See my post above. (y) 😁
 
Top Bottom