[Typo3-dev] Content body wrapping set in a custom header?

Jack Imuasn list-typo3 at jack.org.uk
Wed May 4 20:47:09 CEST 2005


Hi,

	I have only been programming for Typo3 for a few days (though have been
playing with it on-and-off for about a year).

	I need to programatically change (or add) 'div' tags around just the
'content' of a content block. This will link with a client-side script
to allow the user to hide or display different blocks quickly, and at
will bye clicking on the header. I already have a custom header that
calls the javascript correctly.

	I suppose an example will make better sense.

	I currently have this :-

----------------
<!--  CONTENT ELEMENT, uid:85/list [begin] -->
	<a name="85"></a>
	<!--  Header: [begin] -->
		<div class="csc-header csc-header-n2"><img src="typo3temp/GB/1086aa1bf9.gif" onclick="SwitchMenu('menuDivtt_content:85')" alt="" title="" border="0" height="36" width="191"><br></div>
	<!--  Header: [end] -->
	<!--  Plugin inserted: [begin] -->
	<!--
		BEGIN: Content of extension "cpg_view", plugin "tx_cpgview_pi1"
	-->
	<div class="tx-cpgview-pi1">
		Plugin Content
	</div>
	<!-- END: Content of extension "cpg_view", plugin "tx_cpgview_pi1" -->
	<!--  Plugin inserted: [end] -->
<!--  CONTENT ELEMENT, uid:85/list [end] -->
--------------------------

	I would like to achieve this :-

----------------
<!--  CONTENT ELEMENT, uid:85/list [begin] -->
	<a name="85"></a>
	<!--  Header: [begin] -->
		<div class="csc-header csc-header-n2"><img src="typo3temp/GB/1086aa1bf9.gif" onclick="SwitchMenu('menuDivtt_content:85')" alt="" title="" border="0" height="36" width="191"><br></div>
	<!--  Header: [end] -->
	<!--  Plugin inserted: [begin] -->
	<!--
		BEGIN: Content of extension "cpg_view", plugin "tx_cpgview_pi1"
	-->
	<div id="menuDivtt_content:85">
		<div class="tx-cpgview-pi1">
			Plugin Content
		</div>
	</div>
	<!-- END: Content of extension "cpg_view", plugin "tx_cpgview_pi1" -->
	<!--  Plugin inserted: [end] -->
<!--  CONTENT ELEMENT, uid:85/list [end] -->
--------------------------

	Obviously, I could modify my cpg_view plugin to do this for me, but I'm
hoping that there is a way that I could apply this to any content type
(hopefully by just changing the header).

	I'm convinced that there must be some 'wrap' setting somewhere that
will let me do this, but I've scoured the API and tsref documents and
not stumbled upon the correct incantation.

	Can anyone help me?

	Thanks in advance,

Jack

-- 
Jack Imuasn <list-typo3 at jack.org.uk>





More information about the TYPO3-dev mailing list