drupal-7

Where is Drupal 7 termpath?

北城余情 提交于 2019-12-02 08:22:20
问题 Using the pathauto and token module in Drupal 6 allowed you to create url aliases using a pattern like so: [termpath-raw]/[title-raw]. However, this is not the case in Drupal 7. I understand that D7 is still in alpha, but the beta looks to be here pretty soon and it is soooo much nicer that D6 IMO. Is this functionality not available yet? 回答1: In Drupal 7, the word path means something very specific, and apparently something different than what termpath would refer to, and it doesn't look

How to make Drupal 7 Editable field in table for admin only

江枫思渺然 提交于 2019-12-02 08:14:20
问题 $header = array( array('data' => t('S No'), 'field' => 't.id'), array('data' => t('Country Name'), 'field' => 't.country_name'), array('data' => t('Status'), 'field' => 't.status'), array('data' => t('Added Date'), 'field' => 't.added_date'), array('data' => t('Action'), 'field' => 't.id',), array('data' => t('Action'), '',), ); $limit = 10; $query = db_select('countries', 't')->extend('TableSort')->extend('PagerDefault')->limit($limit)->orderby('country_name', ASC); //condition(); $query-

Check if term exists and create a node with rules

我是研究僧i 提交于 2019-12-02 05:20:57
I actually have 2 questions regarding Drupal 7 and Rules.: How to check if a term exists with rules How to make a new node and forward to the node entry with rules Let me sketch the scenario first and then explain in more detail: Im currently creating a simple stock program to be used with a barcode scanner. The barcodes are stored in a taxonomy tree. I have 2 content types, a scan and a product. A user is always presented with the scan content type (one big text input) that the barcode scanner will fill in and submit. Drupal then checks to see if the scanned barcode is present in the taxonomy

Where is Drupal 7 termpath?

南笙酒味 提交于 2019-12-02 04:13:00
Using the pathauto and token module in Drupal 6 allowed you to create url aliases using a pattern like so: [termpath-raw]/[title-raw]. However, this is not the case in Drupal 7. I understand that D7 is still in alpha, but the beta looks to be here pretty soon and it is soooo much nicer that D6 IMO. Is this functionality not available yet? In Drupal 7, the word path means something very specific, and apparently something different than what termpath would refer to, and it doesn't look like there's any been action taken to replace the [*path] tokens just yet (although it's a known issue):

Drupal 7 - Adding an image to a node.tlp.php theme file

对着背影说爱祢 提交于 2019-12-02 02:01:27
问题 I am trying to add an image (small arrow gif icon) which is uploaded to the image directory within my Drupal theme files (root/sites/all/themes/mytheme/images). The following works at the page.tlp.php level, and it also is working at the field.tlp.php level - but it won't work in node.tlp.php. The node.tlp.php file is working effectively but the image doesn't show! If I paste exactly the same code into the other afore mentioned templates it does show..?? <img src="<?php print base_path() .

Drupal 7 - Adding an image to a node.tlp.php theme file

喜欢而已 提交于 2019-12-02 01:29:57
I am trying to add an image (small arrow gif icon) which is uploaded to the image directory within my Drupal theme files (root/sites/all/themes/mytheme/images). The following works at the page.tlp.php level, and it also is working at the field.tlp.php level - but it won't work in node.tlp.php. The node.tlp.php file is working effectively but the image doesn't show! If I paste exactly the same code into the other afore mentioned templates it does show..?? <img src="<?php print base_path() . path_to_theme(); ?>/images/arrow-right.gif" width="20" height="13" alt="Arrow Right"> Any ideas how I

Is Drupal 7 slower than Drupal 6?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 17:08:42
问题 One of the problems with Drupal in general is that it is slow. We run Pressflow 6 in a high traffic production environment and it consumes a lot of resources for a site of its size. Much has been made of whether Drupal 7 is slower than Drupal 6: http://drupal.org/node/615822 It appears that this is indeed the case, but can anybody confirm? Many thanks, Chris. 回答1: Yes. I can confirm. However. First the bad news: Drupal7 core is more complex. Complexity costs performance. Drupal7 core is

Drupal 7 programming advancements, differences from Drupal 6 upgrade or wait

会有一股神秘感。 提交于 2019-11-30 23:17:54
问题 I was just wondering if there were any changes in the Drupal 7 code that effect server load and speed for large sites. Also, with 7 nearing beta release, should I wait to build the sites with Drupal 7? I'm a future kinda guy. I would like to be able to develop Drupal sites for a freelance business I am owner of, and would like to start soon. Is Drupal 7 accepted enough to be developing live, customer sites for? Security Issues? Thanks 回答1: You should wait to pass to Drupal 7 until Drupal 7

How to disable a field or make it readonly in Drupal 7

ε祈祈猫儿з 提交于 2019-11-30 20:45:22
I am trying to disable couple of fields and make them readonly via hook_page_alter(). I was able to do check if user is viewing the page edit section (the form edit) $page['content']['system_main']['#node_edit_form'] == TRUE) then when I tried to disable couple of fields, I found that select list can be disabled by this code: $page['content']['system_main']['field_my_field_name_a_select_list']['und']['#attributes']['disabled'] = TRUE; but if I use the following code it doesn't work: $page['content']['system_main']['field_my_field_name_a_select_list']['und']['#disabled'] = TRUE; I also found

Drupal 7 Browser specific css

瘦欲@ 提交于 2019-11-30 16:11:44
How can i have a browser specific css in Drupal 7 . I would like to load chrome.css if browser is chrome . Please help You can do this in your template.php file with a preprocess_html theme hook and drupal_add_css function. You will find example in drupal 7 theme, for example in bartik : // Add conditional stylesheets for IE drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE)); drupal_add_css(path_to_theme() . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '