XF 1.3 Customising the resources

Mr Lucky

Well-known member
I want to add an image to the resources, so that it appears just in the resources section,( both the main resource page and all the resources themselves)

I want this to appear just below the forum notices and above the title.

Which template do I edit for this please?
 
There may not be one in that exact location.
If there isn't, you will need to edit the templates and include your own custom template.
 
Yes :)

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112

How can I find out which template to edit?
Using your browser, view the page source and look for a line of code near the top of the page which begins
<div id="content" class="; the class is the name of the template. So for the main forum page, the line of code is:<div id="content" class="forum_list">, which makes the template forum_list.


How do I include a template?
Code:
<xen:include template="name_of_template" />
 
Thanks for that, but I'm still a bit confused.

So do I create a new template based on an edited version of an exiting one and give it a name, then include it in PAGE_CONTAINER?

And what do I sue for a conditional statement to make it only appear on resources?

Thanks
 
OK, I'm getting there, but i think I need xenforo for dummies! :) Please be patient

I have created the template ad_resource_above_title, edited it with my content, and included it in PAGE_CONTAINER just above {xen:raw $contents}

I thought that would place it above the title, but when viewing resources, it is below the title.

Where do I need to include it to show above the title (but below notices?)

Thanks
 
OK, I'm getting there, but i think I need xenforo for dummies! :) Please be patient

I have created the template ad_resource_above_title, edited it with my content, and included it in PAGE_CONTAINER just above {xen:raw $contents}

I thought that would place it above the title, but when viewing resources, it is below the title.

OK, have found where to put it above title.

Are you able to tell me what conditional to show on the resource index page and in all the resources, but not on the forums or threads?

Thanks
 
Use your browser inspection tool to check the page names:

Using your browser, view the page source and look for a line of code near the top of the page which begins
<div id="content" class="; the class is the name of the template. So for the main forum page, the line of code is:<div id="content" class="forum_list">, which makes the template forum_list.

Then add the page names into an array like so:
Code:
<xen:if is="in_array({$contentTemplate}, array('page_1', 'page_2', 'page_3'))">
 
OK thanks, but the resources are always changing, so is there no way to just make it appear on all pages of the resources, iefor which the resource tab is selected?
 
Top Bottom