基础篇17. 添加一篇内容,drupal网站的页面结构

龳龲龮龬龩龨龤龡龠龜龘龔龒龏龌龜Drupal齹齵齴齳齯齫齨齧齤龤齡齞齝齜齙齖齒龌齐齎齌齉齈齇龤齆齅齂鼿龌鼾鼻鼷鼴龤龠鼱鼮鼭龌鼪鼧齇齫鼣鼡齎鼞鼛鼗鼷鼴鼖龌鼒鼑龌鼍鼋齇鼊鼉齆齅龒龏龌鼆鼆鼅鼁黾黻黺鼗黷黵黲鼆黰黮黾 龮黪

黩黥黢龨黠黜齒龠龒龏龌黚黖龨黒黑齒龩drupal黊黈龤黇黃黾

黂黲龌齙麿黠黜龒龏麽龬黾麺麹Article龌黷黵龤article麩basic page龜麡麞麝麛麗黖龤龡齞麓麑龒龏麏麎黾

黥黢黲麋麊麉麅齒龠Article龌麂鹿龜齆鹾黾鹻鹸鹵齴鹱齵鹰鹯齤鹰鹮齆麩鹱鹬黾齙麿鹨鹥龌黥黢鹤麗鹡鹞龌黷鹿龜黥黢鼗黷齞麡麞鹚麉麅龤鹗齒龠齆鹾黾

黥黢鹤麗鹡鹞龌黷齞鼾Drupal鹔鹑龤黊黈龌龜鼾鼪鼧鹎鹊龤鹈鹻黃鹑龤黾黩黥黢齒鹇齒鹇龌鼾鹄鹀龒龨鸿鸾黾

黂黲龌鸻鸺齒齞黊黈鸷龜HTML黃鹑龤龌鸩鸦齎龤HTML黊黈鸷鸣鸢鸟龌HTML鹰head鹰body鸕鹱鹬黾鼗Drupal龤齹齵鹇龌黷鸑鼾齒齞鸍鸌html.html.twig龤鷿鷽齆鷼龨鷹鷵黾鷴龜鸦齎drupal黊黈齨鹄鹇龤鷿鷽黾

龬龩龨龌鼗html龤body鹱鹬鼖龌鸢鸟鷱黊黈鹚龤鷰鹈鹻龤鷬鷫龌黷鸑鷬鷫鸷鸣鷪鷨鷧鼗page.html.twig鷿鷽鼖黾鼒鷥黥黢龜鷣鷥鷡鷞鷛鷗鷕鹞黷齞麡麞鹚龤龌鸦麗龌鷓鸣鼗黊黈鷒鹈齎齒齞鷑鷏龤鷡鷞鷍鷋黾黷齞鷍鷋龜鷈鷄鼻黊黈龤龌鸦麗鷃鼣鹎鸢鸟鼗page.html.twig鼖黾鸩龜鷨鼗toolbar.html.twig鼖黾鼗鹇鷀鶼鶻鹚龌龡鶹龜鹊鷀龤黾鶵鶲龜鶮鶬鶪鶩鶦鶢黷齞麡黊龌鹿鹎鸣鶞鶛黷齞鷍鷋龤黾

黊黈page鼖龌鶘鸢鸟鹎鹊龤鶖鶓龌麂鹿龜region黾鶖鶓鷑鶋鷏龤鷿鷽齆鷼龜region.html.twig黾黚黖鼗鹊齒齞鶖鶓鼖龌鶘鸣鸢鸟鹎鹊龤鶖鶉龌block黾鶖鶉鷑鶋鷏龤鷿鷽齆鷼龜block.html.twig黾

鶄鹤麗鹡鹞龌黊黈鹚鶀鵾鵻鵷鹱鶛龤龜鶖鶓龌鵵鵾鵻鵷龜鶖鶓鼖龤鶖鶉黾鶄鹤麗鵴鶖鶓鵳鵯鹑鵬鵩鼖龤鶖鶓龌齌鶵鵦鶲鶖龌鵢鵡鶖龌鼗鵦鶲鶖鼖龌鸣齎鹎鹊龤鶖鶉龌齌鶵龌鵞鵜龌鵙鵘龌鵗鶲黾

鼗齹龒龏鶖鶉鼖龌鷓齎齒齞node.html.twig,鷴鶪龨鵓鼞鵏齒齞drupal龤齫齙龌麂鹿龜鶄鵌鵈黠黜龤黷龠齆鹾黾黷齞齆鹾鵄鼻article龒龏麏麎龌鸩鵏齒齞龒龏麏麎鶘鸷龜鼾鹎鹊龤鵃鵂黃鹑龤龌鼒鼑龌node鼖鷓鸣鸢鸟鹎鹊龤鵃鵂鷿鷽龌鼗黠黜齆鵃龤鵀鴼龌黥黢鹵鴸黮鹮齆鵃鵂麩鹱鹬鵃鵂龌麗鴴黥黢鼡齎鹵鴸龤鴲鴮鵃鵂黾

鶄鹤麗鼗鷬鷫鴬鴫鶖鶓鴧鶪twig debug鷿鴤鹻鹸鴡鹞鹚鴝鷿鷽黾

twig debug鷿鴤鸣鹻鹸鴜鼿鵏齒齞鷿鷽龤鶢鴙麩黇鴗黾鼣鴔鸣龲鴒鶄鷪鴎鶪龤鷿鷽鼗鴋鴈齆鷼鴆鼖鸦鴅龤鴄鷧黾黷黵黥鹿鹎齒齒鴁鶛黮黾

黥黢鸣鼗黖鳾龤鳼鳻鼖鳹鹞龮鶖鶓鼗info齆鷼鼖鳴鳲龌鼗鷿鷽齆鷼鼖鵓鼞龌鼗鶖鶉鳱鳭黊黈鷡鷞鼣鷨鷧鶖鶉鹞鶖鶓鼖黾

鳫鳩鶖鶓麩麓麑鶖鶓

Drupal鸣鷥黥黢鳦鳥2齞鳫鳩鶖鶓龌鷴黢鹻鹸龜page top麩page bottom鶖鶓龌齖鸦麗鸍鷴黢鳫鳩鶖鶓龜鼒鷥鶄鳞鳚鼗鶖鶉鳱鳭黊黈鹡鹞鷃黢龌麂鹎鳘齤鶄鼗info齆鷼鼖鳴鳲鷃黢黾

鼗html.thml.twig鼖鵓鼞龌麗龩龜stable齹齵龤html.html.twig齆鷼鳕鳒龮

<!DOCTYPE html>
<html{{ html_attributes }}>
  <head>
    <head-placeholder token="{{ placeholder_token|raw }}">
    <title>{{ head_title|safe_join(' | ') }}</title>
    <css-placeholder token="{{ placeholder_token|raw }}">
    <js-placeholder token="{{ placeholder_token|raw }}">
  </head>
  <body{{ attributes }}>
    {#
      Keyboard navigation/accessibility link to main content section in
      page.html.twig.
    #}
    <a href="#main-content" class="visually-hidden focusable">
      {{ 'Skip to main content'|t }}
    </a>
    {{ page_top }}
    {{ page }}
    {{ page_bottom }}
    <js-bottom-placeholder token="{{ placeholder_token|raw }}">
  </body>
</html>

鲘鼖鲗鲔鹗6麩鹗4鲌龤鳕鳒鹿龜鶪鼻鵓鼞黷龡齞鳫鳩鶖鶓黾鲈黈鳦鹞龤鷡鷞鲅鲁鱾龌鱽toolbar.html.twig鹿龜鱼鲗鲔鹗鱻鲌龤page top鶖鶓鼖鵓鼞龤黾

鶵鶲龌黥黢鹎鼗info齆鷼鼖鳴鳲鸻鸺鶖鶓龌鱸鱵Drupal鸣鷥黥黢鳦鳥10齞麓麑鶖鶓黾

鷃黢鹻鹸龜龮

  1. page.header
  2. page.primary_menu
  3. page.secondary_menu
  4. page.highlighted
  5. page.help (dynamic help text, mostly for admin pages)
  6. page.content (main content of current page)
  7. page.sidebar_first
  8. page.sidebar_second
  9. page.footer
  10. page.breadcrumb

鶄鷓鹤麗鼗page鷿鷽龤鱫鱩鼖鴡鹞鶋鼻鷴黢龤齂鼿黾

鶵鶲鼗info齆鷼鼖鳴鳲黮鱧鱥龤鶖鶓龌鱸鱵麓麑龤鶖鶓鹿鹎鱣鱠鷣鶪黮龌黷鹊鱞麂鷪鼷鷣鱛鴸黾鹊鷞龌鶵鶲鶄龤黊黈鳱鳭鹮鱚鱗鱔黷10齞麓麑龤鶖鶓龌鱸鱵鶄鹿鹎鳘齤鼗鶄龤info齆鷼鼖鶋鶖鶓鱑鲌鳴鳲黾

鱣鱍鱊齒鱈龮齒鱆鶄鼗鱧鱥龤.info齆鷼鼖鳴鳲黮齒齞鶖鶓龌鹿鸣鱛鴸鱃鰿鹈龤麓麑鶖鶓黾

鶵鶲鶄鳴鳲黮鱧鱥龤鶖鶓龌鶄鷓鳘齤鶪鶋鷏龤鳕鳒鰽鷃鵓鼞鹞黊黈鹚龌黷齞龒龏鰽鼗龩齒齫黒鴝黾鴈鲈龌鶄鰻鳘齤齝鰸龌page top麩page bottom鶖鶓龜鼗html.tpl.php鼖鵓鼞龤龌鸩鲘鷴鸦齎龤鶖鶓鸷龜鼗page.tpl.php鼖鵓鼞龤黾

本书共66小节:

评论 (写第一个评论)