XF 1.4 Position of elements above forum list

Mr Lucky

Well-known member
Say I have two addons that put a box above the forum list, how would I determine in what order they are?

Specifically I have @Brogan 's CTA featured threads and Prefix Forum Listing.

By default the Prefix Forum listing box seems to go above the Featured Threads box.

Can anyone please explain how to make it the other way round if possible so Featured Threads is first.

Thanks
 
It depends how they are added to the template.

My add-on uses a template modification and injects it after the /xen:container tag, with an execution order of 10.

If the other add-on does the same, the execution order will determine which one is at the top and which is at the bottom.

I'm not familiar with the other add-on so I couldn't tell you how it does what it does.
 
It depends how they are added to the template.

My add-on uses a template modification and injects it after the /xen:container tag, with an execution order of 10.

If the other add-on does the same, the execution order will determine which one is at the top and which is at the bottom.

Thanks Brogan. Is it an easy matter to change the execution order? For example what and where would I change it in you addon so that I can experiment?

Thanks
 
You need to enable debug mode, then click on the template modification and change the order here:

I'm not sure what you mean by click on template modification

I am following the instructions here for changing callback execution order.

I get to the list of Code event listeners for CTA Featured threads. Do I change all of them or what?

Thanks
 
Ah I see my mistake - I was just following those instructions which I got when searching for change callback execution.

Have found template modifications but there are none for the other plugin so I guess it works differently. Changing the order for CTA Featured Threads in forum_view (Add a featured threads block to the forum view) does nothing.

What I can find for the other plugin that looks most relevant is in Code Event listeners: template_hook: forum_view_pagenav_before

So does that mean I won't be able to change the order if the plugins are added to the template in different ways?
 
You would need to ask in the thread for that add-on.

No reply there yet.

I understand your point, but with two addons involved which it seems work in different ways, I thought i would get more help in the general styling forum as neither addon developer (understandably) would be in a position to know about the other one.

Your addon is positioned via template modification, it seems the other one isn't so maybe somebody with some knowledge of styling and other ways to position elements may be able to help.
 
As I said in my original post:
It depends how they are added to the template.

Without knowing how the other add-on does it, there's not much more I can say other than move the template edit to earlier in the template.

Try doing the find on <xen:h1>{$xenOptions.boardTitle}</xen:h1> instead.
 
Top Bottom