English 中文(简体)
第7页
原标题:altering footer page on drupal 7

在第六博士中,我的模块有这一次功能,在网页的脚本上插入了一张 j,但在第七博士中, st子已经改变。 我怎么能以零敲碎打的7号手法做到这一点?

function myfunc_footer()
 {
    if(variable_get( myvar ,1) && !drupal_match_path(drupal_get_path_alias($_GET[ q ]),  
           admin/* ))
    {
         if ($somevar = variable_get( somevar ,  ))
             {
        return  <script src=" .$somevar. " type="text/javascript"></script> ;
         }
         else
             {
        drupal_set_message(t( something is wrong. ));
         }
    }
}

预 收

最佳回答

你们的法典中没有任何规定从第6博士改为第7博士。

I don t really understand why you re running drupal_match_path against a path alias though, you should be running that against the router path, not URL path:

if(variable_get( myvar ,1) && !drupal_match_path($_GET[ q ],  admin/* )) {

问,看它是否解决了你的问题,如果你不能够扩大对你重新发现的错误的界限?

EDIT

由于有了更新,你下面的第二点意见几乎正确,你刚刚需要把阵列作为关键内容:

function myfunc_page_alter(&$page) { 
  $page[ page_bottom ][ my_extra_element ] = array(
     #markup  =>  <div><h3> testingthisout</h3> </div> , 
     #weight  => 25
  ); 
} 

无需具体指明<代码>#type => 标识作为markup为违约。

然后,确保毫无疑问地安装了你的模块(称为myfunc),并清除了ches。 你在那里没有任何问题。

问题回答

暂无回答




相关问题
Drupal Multi-language: Simple strings not translated

I m adding additional languages to a Drupal site that I m building. Getting the translation of content working is fairly easy using the Internationalisation module. Yet, simple things such as date ...

Setting up a WYSIWYG editor for Drupal site users [closed]

Looking through the Drupal contrib modules, and after a few Google searches, it becomes evident that there are any number of choices and combos available to set up a WYSIWYG editor in Drupal. I m ...

Change size of user/password login box

I don t know how to change the size of the login username/password boxes on the drupal site that I m trying to build. I m stumbling through the theming, and don t know where to find the file that ...

How does Drupal provide an edit/review/publish model?

How does Drupal support a means to update and review a website before it is published? Does it only allow you to preview a page at a time before you publish it or is there a way to create a site ...

Term for rotating header

I m looking for terminology that describes this behavior: The header of a web-page contains a different image every time you visit it. Update: It is not an advertisement, but images related to the ...

Has anyone checked out Drupal 7? [closed]

Has anyone checked out a copy of Drupal 7 yet? What do people think? I m pretty excited about the PDO and all of the designers I work with a very excited about the new admin interface/structure. Do ...

热门标签