XF 1.1 Move template ousite of the main container

Hi there,
I would like to simply move a template to another position. The best way to explain this is via an example:
Let's take Xenporta and it's news slider (http://8wayrun.com/). If you take a look at the source code or use firebug to analyze the div on the 8wayrun.com, you can see that the slider is inside of the maincontainer div. What I would like to do now is putting that slider at the position where the advertisement is (or if you use an adblocker, the message to support the site by disabling it).

How can I do that. (I even use the same design as 8wayrun.

Thanks and greetings from Germany,
Mathis
 
hmm. The problem is that variables are not parsed, even if you are on the site where the addon is shown in this case on the portal page.
Is there a easy way to change which template hooks an addon/template is using?
 
hmm, ok.
So I have a page (showcase plugin, so showcase index) which contains several boxes in the main content area which are single template files. In the featured items template is {$featuredItems} which I would need in the page container template. How I understood that is that I only can pass variables in the root template of that site, so showcase_index? I tried that and noticed that the index does not have access to {$featuredItems}. Is there a way/should I bypass this from featured_items -> index -> page container?
 
What code are you using? To pass {$featuredItems} you would use this:

Code:
<xen:container var="$featuredItems">{$featuredItems}</xen:container>

Of course the variable must be available in the content template before you can pass it to the container. xen:container may actually work in other templates as long as those template are evaluated before the container.
 
did that.
Of course the variable must be available in the content template before you can pass it to the container. xen:container may actually work in other templates as long as those template are evaluated before the container.
Not sure about the last part, can I check on that?
 
Hmm, so the dumping works in even in the index template of the addon (added dump in first line, outputs array contents correctly)
{xen:helper dump, {$featuredItems}}
To be clear, the content template can be seen in the page source:

http://xenforo.com/community/threads/1-0-0-b1-how-to-identify-the-root-template-of-a-page.5591/
You can use xen:container in that template.
using the correct template, but adding "<xen:container var="$featuredItems">{$featuredItems}</xen:container>" to the first line of the index template and dumping it again, this time in page_container, does return just "NULL".
So did I use xen:container correctly or is it just not possible?

PS: Very helpful dump feature! Thanks :)
 
Got it working. I had to use this in the container since the var contained HTML output:

Code:
{xen:raw $featuredItems}

And in the content template I found that the actual output was a template call, so I had to pass the template call as the value:

Rich (BB code):
	<xen:if is="{$featuredItems}">
		<xen:container var="$featuredItems"><xen:include template="nflj_showcase_module_featured_items" /></xen:container>
	</xen:if>

Then I also edited the nflj_showcase_module_featured_items template and uncommented the section divs so it has a box container in the new location.
 
Back
Top Bottom