drupal-7

Drupal: How to submit the webfrom from REST services using AJAX POST

做~自己de王妃 提交于 2019-12-11 09:26:09
问题 I am having web form module in drupal. I want to submit a form into webform from external app with REST service using the AJAX POST method. I can able to retrieve the web form (node/1) using ajax. On submitting it should not create as new node, instead it will get add into web form. Thanks in advance for any help..... 回答1: To be able to retrieve data from and send data to Webform module with an external application I suggest you to use Webform Service module of Drupal that makes REST API

How Load a Theme For Path

痴心易碎 提交于 2019-12-11 08:34:37
问题 I like Context if Path /gallery Load A New Theme example "Bartik" Other page load "Omega" Theme I'm Install "Context Condition Theme" Modules But it does not working What's your recommendation ? 回答1: Use can use ThemeKey module. Enable ThemeKey module and its required sub modules, then go to the config page at admin/config/user-interface/themekey . Here you will see may options for switching the theme. As you required there is an option path:node_alias so select this option and also set the

Drupal 7 table theme unable to display values seen in Firebug

北城以北 提交于 2019-12-11 07:53:20
问题 I am migrating from Drupal 6 to Drupal 7 and had a Java script related issue which got resolved . Now i am able to see the pages without the error i used to see earlier. The screen shows the firebug view of the page post the dropdown change and javascript run. The Firebug shows the value of the project ID it acquired but the table shows blank. This is the method in php and this is the table theme used for displaying the table seen in the screenshot. All this was visible in Drupal 6 but i am

nginx rewriting with drupal windows

天大地大妈咪最大 提交于 2019-12-11 07:29:47
问题 this is the first time i use nginx , and i have two problems with it, the first one is that i want to redirect http://localhost/project automatically to http://localhot/project/en/ and en is subdirectory on project. The second problem : in localhost/project/en/ i can see the index.php i mean the main page but every redirecting from the project give me 404 not found like localhost/project/en/people/ or localhost/project/en/people/article1 NB : i use nginx in windows with drupal and . here is

drupal 7 custom content hook_theme output

大兔子大兔子 提交于 2019-12-11 07:29:16
问题 I have a custom module created in Drupal 7 and I want it to display some HTML content. Here is how I have did. But it is not working, what I do wrong? <?php /** * Implements hook_block_info(). */ function submenus_block_info() { $blocks = array(); $blocks['info'] = array( 'info' => t('The submenu zone') ); return $blocks; } /** * Implements hook_block_view(). * */ function submenus_block_view($delta = '') { $block = array(); $users = "edf"; $title = "sdfsd"; $block['subject'] = t('Submenu');

Extract URL from link field in Drupal?

痞子三分冷 提交于 2019-12-11 07:08:19
问题 I have a link field that is composed from a URL and the title, I need to print out only the URL of the link field without the title in my node content type tpl file, is that possible ? Thanks! 回答1: It should be as easy as: $url = $node->field_name_of_field[$node->language][0]['url']; I'll break that down a bit: Fields are members of the node object and are always prefixed with field_ so a field called my_field can be found with $node->field_my_field . Each field members of the node object is

Views Module load all unwanted field value with field_sql_storage_field_storage_load

时光总嘲笑我的痴心妄想 提交于 2019-12-11 04:55:04
问题 I am anoid by Views module, it load all field value by field_sql_storage_field_storage_load for each one but not only selected into field displaying. check below : Content type definition Views definition I'm using Devel module to display queries onload and it display field_shouldnotloaded queried but i don't need it ! So, Views load all field , if you have 100 fields and want to display only one , you'll have 100 queries performed for 1 value to display => 99 useless.. This is a bad thing

Attach or embed node add form with a view

守給你的承諾、 提交于 2019-12-11 04:53:50
问题 I am using Drupal 7.54. I want to attach or embed a node add form to a view so that when a user submits the form, the view below the form will be updated in realtime via ajax. The form will be shown above the view. My view block name is Statuses Stream . I tried Form block module and putting the form in the header section of my view using views ui, but after submit, it was redirecting to the node created page. Then I tried Advanced Form Block module. I created a form using AFB module. The

Drupal 7 - get variables from hook_theme

為{幸葍}努か 提交于 2019-12-11 04:52:00
问题 I tried to pass a variable from a custom module to a tpl file. In my custom module (named example) 1. I created a route with an argument via hook_menu : function example_menu() { $items['example/fancybox-photos/%'] = array( 'page callback' => 'example_display_fancybox_photos', 'page arguments' => array(2), 'type' => MENU_CALLBACK, 'access arguments' => array('access content'), ); return $items; } 2. I created my page callback function : function example_display_fancybox_photos($nid) {

After moving my Drupal 7 site to another host, modules are appeared without download

依然范特西╮ 提交于 2019-12-11 04:24:46
问题 I'm sorry for such a complex subject. My problem is. I tried to move my Drupal 7 site from one server to another. I uploaded a fresh install to my new site. I backed up my old database and imported to my new site. I uploaded settings.php file to my new site. When i entered to my new site's module part, All the 3rd party modules i installed in my old site, exist in my new site without any loss :) But when i check the folders /sites/all/modules /sites/default /modules I couldn't find any file