Why is it so complicated? Any tips to simplify or speed up learning?

I have been doing PHP programming for 4 years, and even I find it so confusing and difficult to understand. I have no idea how they expect designers to manage them.

I know the main topics, topics with tpl files, presentation templates, viewing templates, etc. However, I get lost whenever I enter the template.php file.

I needed to specify a node input form for a custom content type. I destroyed my brain over it, like 7-9 textbooks, and it still does not get together. I understand why creating a module can be difficult, because most of the people who work with the modules are still developers.

However, when even a developer cannot understand theming , it is definitely redesigned!

Perhaps this is my fault, maybe I did not learn Drupal correctly. In this case, is there a step-by-step system in order to become the guru of Drupal?

+3
source share
6 answers

The topic is actually not that complicated if you only know basic php. You have 3 ways to change the markup, css and js that you can handle.

  • . , , , .. noce, , cck , $content. , , node.

  • , , , . , hooks: yourtheme_page yourtheme_node node .. - , .

  • . , . yourtheme_[theme_function_name]. php . , , .

90-95% , . , Drupal 6 () . hook_form_alter, , , .. Drupal 7, .

, 3 , . , , devel themer . , , devel, , , , fx CCK node.

+9

, Front End Drupal.

, Drupal , , , ,.info . PHP, .

, - , php, CSS HTML. , CSS, php.

, , / (, Zen Genesis). .

+6

"!". , .

, , , PHP, , PHP ( " ... - , ?!" )

@googletorp , , :

1) , . , , .

2) devel, " " ( , ), "Render" dpm() dvm()

3) Drupal. , , , , , .

4) . PHP - API Drupal. , Drupal, PHP (.. , , - , PHP , ), .

! , .

+5

, :

Drupal , - , . @googletorps . " -" : . : , " . Fullstop".

, . Drupal . , :

username<menuitem<menuitem<menuitem<menu<block<region<page. 

, . , - , "", , , . . , . Drupal : . . , , , /.

, , , , - Drupal , . , , .

+2

One of the biggest tricks is to redefine something that normally displays using the theme function in the template. This gives you much more control over the markup, and also allows you to use preprocess functions to manage variables before passing them to the template.

This is a great benefit for thematic forms. Watch a short video that explains this better than I could here: http://drupaldojo.com/session/fine-tuning-ui-theming-forms-drupal-60

+1
source

Source: https://habr.com/ru/post/1764631/


All Articles