我参照ctools给的例子写了一个modal的测试,效果是出来了,但是发现窗口的控制参数,比如宽度高度最后没有作用在窗口上,我去看了下它给的例子效果页面: ctools_ajax_sample 列出的效果,发现也是一样,我直接给它改了宽度,但最后呈现的窗口还是几乎和网站宽度一样,不知这是个bug还是需要注意其它地方呢?请问我该怎么正确控制窗口的参数呢? 论坛: 有问必答Drupal版本: drupal7 (1),ctools的modal我没有用过。 (2),好像 (1),ctools的modal我没有用过。 (2),好像有个modal form模块,也是基于Ctools,里面好像可以设置高度,宽度,你参考一下这个模块是怎么实现的。 多谢老葛!我对比了下,发现是一个参数的传递作用的, 多谢老葛!我对比了下,发现是一个参数的传递作用的,这下明白了 $links[] = ctools_modal_text_button(t('Modal Login (default style)'), 'ctools_ajax_sample/nojs/login', t('Login via modal')); // The extra class points to the info in ctools-sample-style which we added // to the settings, prefixed with 'ctools-modal'. $links[] = ctools_modal_text_button(t('Modal Login (custom style)'), 'ctools_ajax_sample/nojs/login', t('Login via modal'), 'ctools-modal-ctools-sample-style'); 我们定义好的那个modal格式名(如:ctools-modal-ctools-sample-style),要传过去才行。
(1),ctools的modal我没有用过。 (2),好像 (1),ctools的modal我没有用过。 (2),好像有个modal form模块,也是基于Ctools,里面好像可以设置高度,宽度,你参考一下这个模块是怎么实现的。
多谢老葛!我对比了下,发现是一个参数的传递作用的, 多谢老葛!我对比了下,发现是一个参数的传递作用的,这下明白了 $links[] = ctools_modal_text_button(t('Modal Login (default style)'), 'ctools_ajax_sample/nojs/login', t('Login via modal')); // The extra class points to the info in ctools-sample-style which we added // to the settings, prefixed with 'ctools-modal'. $links[] = ctools_modal_text_button(t('Modal Login (custom style)'), 'ctools_ajax_sample/nojs/login', t('Login via modal'), 'ctools-modal-ctools-sample-style'); 我们定义好的那个modal格式名(如:ctools-modal-ctools-sample-style),要传过去才行。
(1),ctools的modal我没有用过。 (2),好像
(1),ctools的modal我没有用过。
(2),好像有个modal form模块,也是基于Ctools,里面好像可以设置高度,宽度,你参考一下这个模块是怎么实现的。
多谢老葛!我对比了下,发现是一个参数的传递作用的,