Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-24 02:48:08

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Understanding dom_attach()

This is a great addition to TXP 4.0.4 and I’ve been playing around with it for a bit. Out of a curiosity, is there any way to insert content between the “Sort and Display” fieldset and the “more” link?

From my understanding of the function it will add code at the bottom of the defined “id”, so:

dom_attach('write-sort', 'hello', 'hello', 'div', 'mydiv')

will produce something equivalent to:

<div id="mydiv">hello</div>

and place it before the close ‘div’ tag for the ‘div’ with id=‘write-sort’

Offline

#2 2006-10-24 05:17:05

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Understanding dom_attach()

Out of a curiosity, is there any way to insert content between the “Sort and Display” fieldset and the “more” link?

You’d probably need to write your own javascript to find the appropriate place in the DOM. See the dom_attach() source for a starting point.


Alex

Offline

Board footer

Powered by FluxBB