基础篇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鼦鵲鼯龦鼊

本书共56小节:

评论 (写第一个评论)