Hi sun,

Tnx for pointing out your module for me. It looks like what I need, but I was wondering: the form-actions div also wraps up the comment-wrap in comment preview page. Is this intended? I thought this might be a little bug because I don't see why it should be wrapped along the buttons.

For now I might stick to my css based solution, but the sliding doors technique looks interesting.

Tnx in advance!
Cheers,
Danny

CommentFileSizeAuthor
#2 rootcandy.png1.83 KBdanny_joris
comments-wrap101.4 KBdanny_joris

Comments

danny_joris’s picture

Oh, and I think .comment-wrap is a div that I made myself in a template file.

danny_joris’s picture

StatusFileSize
new1.83 KB

It's also messing up my rootcandy buttons.

danny_joris’s picture

It is a bit tweaky but in the end I just used this code in a custom module for my wrapper.

<?php
function custom_form_alter(&$form, $form_state, $form_id) {
	

  if ($form_id == 'comment_form') {
  	
  	if (isset($form['preview']) AND isset($form['submit']) ) {
    	$form['submit']['#prefix'] = '<div class="button-wrapper">';
    	$form['preview']['#suffix'] = '</div>';
  	}
  	elseif (!isset($form['preview']) AND isset($form['submit'])) {
    	$form['submit']['#prefix'] = '<div class="button-wrapper">';
    	$form['submit']['#suffix'] = '</div>';
  	}
  	elseif (isset($form['preview']) AND !isset($form['submit'])) {
    	$form['preview']['#prefix'] = '<div class="button-wrapper">';
    	$form['preview']['#suffix'] = '</div>';
  	}
}
?>
sun’s picture

Status: Active » Closed (duplicate)