简体   繁体   English

制作页面的Drupal问题

[英]Drupal issues with making pages

在此处输入图片说明 I am new to drupal. 我是drupal的新手。 I have made a site and front page along with several "basic pages" from within the system itself. 我已经在系统本身内部制作了一个站点和首页以及几个“基本页面”。 What I can't see to figure out is this: 我看不出是这样的:

I click on a link on the home page, and it's linked to one of those "basic pages" 我单击主页上的链接,然后链接到这些“基本页面”之一

It just loads on a white drupal background. 它仅在白色drupal背景上加载。

What I want to do is have numerous pages with regions like I had on the front page. 我要做的是有很多页面,这些页面都具有与首页相同的区域。 How do I go about getting all this set up? 我该如何进行所有设置?

I know this probably sounds easy to most, but it escapes me at the moment. 我知道这听起来似乎对大多数人来说都很容易,但此刻我却不为所动。

My footer seems to stretch across all pages as well. 我的页脚似乎也遍及所有页面。 Though that seems to be it. 虽然那似乎是事实。

Also, I'm using drupal 7 另外,我正在使用drupal 7

First you need to create new custom theme which will include in sites/all/themes/[your theme name] folder. 首先,您需要创建新的自定义主题,该主题将包含在sites / all / themes / [您的主题名称]文件夹中。

Note: You need to active that new theme from appearance setting from drupal admin. 注意:您需要从drupal管理员的外观设置中激活该新主题。

In that folder, you will have to create different regions into .info file. 在该文件夹中,您将必须在.info文件中创建不同的区域。 Then you can please blocks on different regions as per your need using admin panel. 然后,您可以根据需要使用管理面板在不同的区域进行屏蔽。

Now, in templates folder of your theme you need to copy page.tpl.php template and rename as page--front.tpl.php (This template will call for Home page). 现在,在您主题的templates文件夹中,您需要复制page.tpl.php模板并重命名为page--front.tpl.php(此模板将称为Home page)。

You can now set your regions into these template for your home page. 现在,您可以将区域设置为主页的这些模板。

After all changes, please clear cache from system admin (/admin/config/development/performance). 完成所有更改后,请从系统管理员(/ admin / config / development / performance)清除缓存。

okay..just do one thing. 好吧..只需做一件事。 please create three regions in .info file of theme folder. 请在主题文件夹的.info文件中创建三个区域。

regions['header'] = Header
regions['header_navigation'] = Header Navigation
regions['footer'] = Footer

Now, go to page.tpl.php and put below respected code in template where you want to show this feature. 现在,转到page.tpl.php,然后在要显示此功能的模板中放入受尊敬的代码。

For Header 对于标题

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

For Navigation 导航

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

For Footer 对于页脚

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

Note: Please make sure you have to set block from the given regions (You can check this block structure list) also make sure you are working on active theme. 注意:请确保您必须设置给定区域中的块(您可以检查此块结构列表),还请确保您正在使用活动主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM