• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 How do you reuse or include templates?

Razasharp

Well-known member
#1
Or the content within them?

I want to copy the prefix selector from the new thread template, and display it inside the page container template (to show above each forum that has prefixes - so they can be selected easily)

The code responsible seems to be this:

Code:
		<xen:include template="title_prefix_edit">
			<xen:set var="$selectedPrefix">{$prefixId}</xen:set>
			<xen:set var="$idSuffix">thread_create</xen:set>
		</xen:include>
Any ideas on how best to achieve this, or tips on dipping into the XF library generally?
 

Razasharp

Well-known member
#3

Razasharp

Well-known member
#6
If the template you are including requires data, you will need to make sure the data is available to it when you attempt to call it.
Thanks Jeremy.

Does the data have to be specifically available to the template? (If so how can I go about doing that?)

I put the code in my first post, in the Page Container template, so was expecting two drop downs for categories to appear on the new thread page - but only the usual one does.