drupal

How to add a header area?

六眼飞鱼酱① 提交于 2019-12-25 03:35:30
问题 Please tell me how to add a header area on this page. Photo below. 回答1: Declare any new regions in your THEMENAME.info.yml file. Print your region in page.html.twig. If you declared header: 'Header' then you will print it in page.html.twig like this: {{ header }} After that you can create your custom block and place it in the newly created region. For more details and info go to Drupal 8 Docs. 来源: https://stackoverflow.com/questions/53790860/how-to-add-a-header-area

Why are characters inserted in my PHP link?

早过忘川 提交于 2019-12-25 03:34:37
问题 I created a module, but the link is not correct. My site now shows : /store/2?0=/cgv The correct link should be : /store/2/cgv Why doesn't it work ? where is the error ? What should I change in the code below, to get the link ? <?php namespace Drupal\commerce_agree_cgv\Plugin\Commerce\CheckoutPane; use Drupal\Component\Serialization\Json; use Drupal\Core\Form\FormStateInterface; use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase; use Drupal\commerce_checkout\Plugin

Create Content Type Button

£可爱£侵袭症+ 提交于 2019-12-25 03:30:44
问题 I'm pretty new to drupal development. I have a group node and inside it a content type called efforts. To this efforts i need to add a calendar and I also need to a add a create event button inside the effort page. the event is another content type that I created for the calendar. I already created the two content types for handling events and efforts. I also added a calendar view to the effort. I need to add a create event button to the effort page. Can some one tell me how do i do this ?

Track user's action

喜欢而已 提交于 2019-12-25 03:22:44
问题 In our company I have to extend the functionality of existing Drupal 7 website. Here are the requirements: The business needs to inform all staff members, on different topics using uploaded to the Drupal site documents. (I already implemented this requirement.) The business needs to know, which staff members have read a document and which still have not. They need a report like this: Document 1 25/50 (25 from 50 staff members still didn't read the file) Document 2 50/50 (all staff members did

Lazy load making pages freeze/load very slow on IE?

丶灬走出姿态 提交于 2019-12-25 03:02:47
问题 I'm working on a Drupal site that had lazy load implemented into it because it is very image heavy. The feature works on every browser but IE, in which the page periodically freezes when scrolling down to see images due to a "long running script". It seems like this is something of a known issue, but I can't seem to find a conclusive fix for the problem. Does anyone know if there is a known-workaround, or is this still a case-by-case fix? 回答1: I assume you are using a lazyloader like jquery

drupal cck date field question

点点圈 提交于 2019-12-25 02:48:05
问题 I've added CCK Date field to my node type using the Textfield with Date Popup wiget. The granularity is set to include Hours and Minutes. The display show two textareas, one for the date and the other for time. How do I override the time field to be a drop down? I can't see how I can do this via form_alter hook as my date field does not appear in the $form value. Thanks Steve 回答1: In your database, set your custom module's "weight" in the system table to be higher than that of CCK. If it is

Possible pitfalls on a multilingual Drupal site?

帅比萌擦擦* 提交于 2019-12-25 02:44:25
问题 I'm about to embark on a journey to build a multilingual Drupal site, where I will most likely have to use Views, Panels and Taxonomy pretty heaily. I am a bit worried about the new-node-for-every-language approach, especially using Panels. So far I've gotten it to work similarly to what I want by not having multilingual support for the Panels content-type, and fetching content that is from Current language and language neutral . This seem to work as expected, but I'm seeing some problems

Scaling Drupal 7 on Openshift

廉价感情. 提交于 2019-12-25 02:33:13
问题 i am setting up a drupal site and would like to make it scalable on openshift (bronze plan, Small.highcpu). two questions in this respect: a) background tasks? would be great if someone can explain point 3 in more detail: from https://github.com/openshift/drupal-quickstart/blob/master/README.md: Because none of your application code is checked into Git and lives entirely in your data directory, if this application is set to scalable the new gears will have empty data directories and won't

Theming Module Output

我们两清 提交于 2019-12-25 02:15:43
问题 What I am trying to do is generate some raw output within a module. I would like to pass an array of data through to a template file, and then use that data to populate the code from the template. The template is represented by a file in my theme folder. I have a hook set up for a certain URL (/itunes): $items['itunes'] = array( 'page callback' => 'itunespromo_buildpage', 'type' => MENU_SUGGESTED_ITEM, 'access arguments' => array('access content'), ); ..inside itunespromo_buildpage...

html making table borders invisible

北战南征 提交于 2019-12-25 02:07:29
问题 I use Drupal 6 with theme summertime. Also I use FCKeditor. In order to align content I wanted to create a table with invisible borders. First I tried FCKEditor table properties and I gave 0 to border size in order to make borders invisible. But it did not work. I looked up the source and non working code was like below (Why giving border="0" did not work?) : <table width="468" cellspacing="0" cellpadding="0" border="0" style="width: 468px; height: 201px;"> <tbody> <tr> <td> <h2 class=