基础篇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鼓鵌鼛龯黹

本书共42小节:

评论 (写第一个评论)