【问题标题】:How do you change the format of the header of a ctools modal window in Drupal?如何更改 Drupal 中 ctools 模式窗口的标题格式?
【发布时间】:2011-06-08 04:21:17
【问题描述】:

我有一个标准的 ctools 模式窗口。我可以设置标题部分标题文本的样式,并自定义该文本,但我想更改具有“关闭窗口”和 X 图标的标题右侧。

具体来说,我想使用不同的 X 图标并删除文本“关闭窗口”。我该怎么做?

【问题讨论】:

    标签: drupal drupal-6 drupal-ctools


    【解决方案1】:

    您可以更改 hook_preprocess_html 函数中的设置

    drupal_add_js(array(
      'CToolsModal' => array(
        'closeImage' => theme('image', array(
          'path' => drupal_get_path('theme', 'mytheme') . ('/img/modal_close.png'),
          'title' => t('Close window'),
          'alt' => t('Close window'),
        )),
    )), 'setting');
    

    【讨论】:

      【解决方案2】:

      我创建了一个新的x 图标,然后进入 ctools 图像文件夹并将icon-close-window.png(旧的x)替换为我的新x

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-07-27
        • 1970-01-01
        相关资源
        最近更新 更多