Blocks and VARs

basic functions and we:tags
Michael_S
Senior Member
Beiträge: 160
Registriert: Mi 4. Feb 2004, 02:39
Wohnort: London / UK
Kontaktdaten:

Blocks and VARs

Beitragvon Michael_S » Mi 2. Jun 2010, 14:26

Is it possible to display data from blocks using we:var or PHP code?

I have a repeating block to create a tabs for a sliding panel (JQueryTools) and wanted to keep the panel data inside the block, otherwise I will have to use 2 blocks, one for the tabs and one for the data.

Thanks in advance,

Michael.
Production Area
London, UK
http://productionarea.com

Liquid
Senior Member
Beiträge: 1172
Registriert: Do 8. Jan 2004, 12:31
Wohnort: Karlsruhe

Re: Blocks and VARs

Beitragvon Liquid » Mi 2. Jun 2010, 16:17

Hi Michael,

I am quite sure that there is a way to do it with we:var but i don`t know it... :roll:
But there is another way that may work for you.

Code: Alles auswählen

<we:ifEditmode>
	<we:block name="tabs">
		<we:input type="text" name="tab_description" /><br />
		<we:input type="text" name="tab_content" />
	</we:block>
<we:else />

<!--- Output for the Tab description -->
<we:block name="tabs">
	<we:input type="text" name="tab_description" /><br />
</we:block>
<hr>
<!--- Output for the Tab content -->
<we:block name="tabs">
	<we:input type="text" name="tab_content" /><br />
</we:block>
</we:ifEditmode>
In Editmode you can manage the Tab Description and the Tab content in one we:block, an on the page you split the output by using 2 we:block on for the tabs and the other one for the content.
There may be performance issues in large we:blocks or on slow server but imho it´s the easiest way .
Gruß Liquid


Zurück zu „Creating templates“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste