Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Drupal新主题创作_Drupal_Drupal 7_Drupal Theming - Fatal编程技术网

Drupal新主题创作

Drupal新主题创作,drupal,drupal-7,drupal-theming,Drupal,Drupal 7,Drupal Theming,我对drupal是新手。我创建了一个新的drupal主题。我的主题影响了drupal页面。如果单击“添加内容页”,则内容页未格式化。我无法在新主题中添加内容。 这里有一个粘贴page-front.tpl.php文件 <div id="wrapper"> <header id="header"> <div class="section clearfix"> <

我对drupal是新手。我创建了一个新的drupal主题。我的主题影响了drupal页面。如果单击“添加内容页”,则内容页未格式化。我无法在新主题中添加内容。 这里有一个粘贴page-front.tpl.php文件

    <div id="wrapper">
              <header id="header">
                <div class="section clearfix">
                <div class="logo_left">
                    <?php if ($logo): ?>
                        <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
                            <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
                         </a>
                    <?php endif; ?>
               </div>
               <nav class="logo_right"><?php print render($page['header']);?></nav>

              </div></header> <!-- /.section, /#header -->  

                <div id="menu">
                    <!--ul>
                         <li><a href="#">About</a></li>
                         <li><a href="#">Service</a></li>
                         <li><a href="#">Client</a></li>
                         <li><a href="#">Contact</a></li>
                    </ul-->

                    <?php print render($page['header_menus']); ?>

                </div>

                    <div id="content">
                            <div id="leftcontent">
                                     <div id="flash">

                                  </div>
                    <div id="leftcontent1" >
                           <div class="rightcontentheader"> <h2>CLIENT REPORTING</h2></div>
                        <?php print render($page['block_one']); ?>      
                    </div>
                    <div id="leftcontent2">
                     <div class="rightcontentheader">  <h2>AUTOMATED MARKETING</h2></div>
                        <?php print render($page['block_two']); ?>      
                    </div>  



                            </div>





                            <div id="rightcontent">
                                        <div id="rightconent1">
                                          <div class="rightcontentheader"> <h2>REAL ROI IMPACT</h2></div>
                                                <?php print render($page['galery_right']); ?>       
                                         </div>
                                     <div id="rightconent2">
                                          <div class="rightcontentheader"><h2>LATEST NEWS</h2></div>
                                                <?php print render($page['block_three']); ?>        

                                     </div>
                            </div>
                    </div>
     <div id="footer">
     </div>
    </div>

您需要一个名为page.tpl.php的页面模板文件。在那里你可以定义你的布局。如果找不到该文件,drupal将返回其默认主题。未格式化但包含所有内容

在上,您可以找到这个默认的page.tpl.php文件。我建议您从这里开始编辑,保留所有php变量。删除变量会导致部分页面无法加载

更新 很抱歉,该链接是针对Drupal 5的,也许您可以更好地使用其中一个附带模板的文件

更新2
更新了Drupal 7的链接。您必须单击评论上方的“查看源代码”按钮

请列出主题目录中存在的所有文件谢谢您的回复。我已经创建了page-front.tpl.php。但同样的问题也会出现。请检查一下。您是否有包含样式表的html.tpl.php?你的主题文件夹中是否有CSS文件,它是否在theme.info文件中?这些是我能想到的最后一件事。谢谢你的回复。我已经在html.tpl.php中包含了我的css文件,在.info文件中也包含了css文件,但我无法在我的新创建主题中添加内容。很抱歉误解了你的问题。您是否已将维护页面设置为模板?它在这个世界的底部。这是我能想到的最后一件事。不,我没有为我的主题设置任何维护页面。我的问题是新主题反映了我的drupal站点。我单击了一个链接并正确地构造链接工作页面格式良好。但我正在单击添加内容链接页面格式出现问题。