[TYPO3-project-formidable] Accordion - open first one automatically by default?

Jerome Schneider typo3dev at ameos.com
Tue May 26 09:44:00 CEST 2009


Hi Stig Nørgaard Færch,


The trick would be to use an onload event on your accordion, like this:

<renderlet:ACCORDION name="accordion">
	<!-- ... childs and other props here -->
	<onload runat="client">
		<userobj>
			<php><![CDATA[
					
	return $this->aORenderlets["accordion"]->majixFirstTab();
					
			]]></php>
		</userobj>
	</onload>
</renderlet:ACCORDION>

Renderlets may define onload events, and of type ajax or client, 
depending on your needs. In opposition to checkpoints, that are limited 
to the php execution.


Regards,
Jerome Schneider


Stig Nørgaard Færch a écrit :
> Stig Nørgaard Færch skrev:
>> On this site:
>> http://www.stickmanlabs.com/accordion/
>>
>> The first one is open by default - how can I accomplish this with 
>> Formidable?
> 
> I'm trying to solve this somehow.
> And I found the onCheckPoint property.
> If I set "when" to "end" and echo 123, shouldn't 123 be rendered after 
> and not before the generated Formidable content?
> I get an "Warning: Cannot modify header information - headers already 
> sent ..." error.
> 
> Anyway, I'm trying to fire this one off:
> return($this->aORenderlets["accordion"]->majixSetActiveTab("acc-toggle-1")); 
> 
> 
> The method is available, as it doesn't return any errors. But it doesn't 
> activate the tab. I think that it's actually run before and not after 
> end. Or - I might be wrong...
> 
> /Stig


More information about the TYPO3-project-formidable mailing list