Skip to content

Connection ordering

scribu edited this page Sep 18, 2011 · 17 revisions

Since version 0.9, when registering a connection type, you can set the 'sortable' flag:

	$my_connection_type = p2p_register_connection_type( array( 
		'from' => 'post',
		'to' => 'page',
		'sortable' => 'order'
	) );

This will make the connection rows sortable via drag-and-drop. The ordering information will be stored in the 'order' connection field and will automatically be used when calling $my_connection_type->get_connected().

Clone this wiki locally