drupal-7

custom page-xxxx.tpl.php doesnt works

时间秒杀一切 提交于 2019-12-13 16:15:15
问题 I have page named page--news.tpl.php, which i created for my news page. But after i cleared my cache, page still not using, and drupal use the original page.tpl.php. Any ideas how to solve it? 回答1: An alternate way of doing it, is through preprocess hook with few lines of code. Here's how it goes function <module_name>_preprocess_page(&$variables) { if (isset($variables['node'])) { $variables['theme_hook_suggestions'][] = 'page__'.$variables['node']->type; } } Suppose you have a node type as

Server error 500 [closed]

∥☆過路亽.° 提交于 2019-12-13 09:55:38
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am working on drupal7. When I try to open the website, it gives internal server error: HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill

How to onclick-trigger a non-native jQuery plugin's action?

寵の児 提交于 2019-12-13 07:46:13
问题 I've installed a 3rd-party jQuery plugin (it's an accordion). It displays on my page, and works as expected. I want to trigger one of the plugin's actions (open a particular slide) when I click on an image on my page. I can't seem to get the code &/or syntax for doing that right. The plugin I've installed is "EasyAccordion" (http://www.madeincima.eu/blog/jquery-plugin-easy-accordion/). It's .js source is posted here: http://pastebin.com/55JB4pr2. I'm using the plugin on a Drupal7 page. I don

How to list all child pages of current parent page in drupal 7?

不想你离开。 提交于 2019-12-13 07:25:48
问题 Suppose I have parent pages A1 and B1. A1 has child pages A1.1, A1.2,A1.3 and B1 has child pages B1.1, B1.2. I want to list all the respective child pages on A1 and B1. In every child page I have an image and a title. These 2 information needs to be listed in the form of a teaser on the parent page. I need help in doing this whether by coding or by using views, I don't mind as far as I get the proper results. Thank you 回答1: You can do this is views by creating a view displaying the fields you

Custom Mobile Menu in Drupal 7 can't access child links

这一生的挚爱 提交于 2019-12-13 06:54:40
问题 My company took over the maintenance of a website and I am trying to determine how to properly get both the top-level (parent) links as well as the child links. The code that was being used is: <div id="monav"> <ul> <?php $mobile_menu = menu_navigation_links('menu-mobile-nav'); print theme('links__menu_mobile_nav', array('links' => $mobile_menu)); ?> </ul> This only spits out the top-level. I have been digging through forums and code trying to find the correct way to get the child links. Can

Drupal error after applying xmlsitemap module patch

时光总嘲笑我的痴心妄想 提交于 2019-12-13 06:44:32
问题 I use xmlsitemap module and I need to change frequency option, so I tried to apply the patch https://www.drupal.org/node/1811692, the patch was applied successfully, but in this case after I got an error with sitemap generation, when I try rebuild sitemap What's wrong? Is there any way to fix it? 来源: https://stackoverflow.com/questions/36716993/drupal-error-after-applying-xmlsitemap-module-patch

Drupal 7 configuration error with Postgresql in Mac OS 10.6.5

蓝咒 提交于 2019-12-13 05:45:27
问题 I am trying to configure Drupal 7 with Postgres. At the database setup step, I get the following error. Warning: PDO::_ construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in DatabaseConnection-> _construct() (line 300 of /Users/shamod/Sites/drupal/7/includes/database/database.inc). In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database

Which CMS should be used to build web site using PostreSQL, can latest WordPress used

≯℡__Kan透↙ 提交于 2019-12-13 05:42:49
问题 I’m looking for a way to build web site which uses PostreSQL to store web pages and allow users to modify them. Admin user should able to create and changed pages using html editor from browser. Site runs in Debian Squeeze x64 VPS using Apache. There are already Mono 2.8 and PostreSQL 9.1 applications running in this VPS. There is no PHP installed but it can probably installed if software requires this. Maintaining MySql in addition to PostreSQL in same server may be not reasonable so I'm

Using different templates for different nodes in Drupal 7

偶尔善良 提交于 2019-12-13 04:52:28
问题 I am using Drupal 7. I want to add a template for a group of nodes. For example, If i have three nodes node/3, node/4, and node/5, I want to use a particular template. Is there a way to do that? If it is, How can i do that? Or What is the best alternate method? Now I am using page.tpl.php template for all the pages except the front page. 回答1: Have you had a look at this: https://drupal.org/node/1089656 The node--[type|nodeid].tpl.php part may be what you are looking for. The theme developer

How to insert into database Drupal Custom Fields

半腔热情 提交于 2019-12-13 04:43:30
问题 I retrieve content types with the following code $form['ct'] = array( '#type' => 'checkboxes', '#options' => node_type_get_names(), '#title' => t('Hangi tür içerikler hakkında bilgi almak istersiniz?'), ); And It gives the following output http://i.stack.imgur.com/TOfS6.png And when I press Create new Account button, the POST Array is so : http://i.stack.imgur.com/BtxhC.png My Question is How can I insert into database these values and read? 回答1: There are two ways of saving this data and