Skip to content

Commit 435b95d

Browse files
authored
Update engine.md
These corrections to the parse docs are necessary and verified for EE6.
1 parent ae57472 commit 435b95d

1 file changed

Lines changed: 55 additions & 42 deletions

File tree

docs/templates/engine.md

Lines changed: 55 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,20 @@ The Template Engine processes the selected template fully from top to bottom thr
2424
3. If it exists, get [template from file](general/system-configuration-overrides.md#save_tmpl_files)
2525
4. If template type is [static](control-panel/template-manager.md#create-template), return template and end parsing
2626
5. Parse (as a group, so order is irrelevant):
27-
- {freelancer_version}
2827
- [Template partials](templates/partials.md)
29-
- [MSM variables](msm/code.md#variables): {site_id}, {site_label}, {site_shortname}
28+
- [MSM variables](msm/code.md#variables): {site_id}, {site_label}, {site_shortname}, {site_name}, {site_url}, {site_description}, {site_index}
3029
- [{last_segment}](templates/globals/url-segments.md#last-segment)
3130
- [Member variables](templates/globals/single-variables.md#member-variables)
32-
6. Parse [segment variables](templates/globals/url-segments.md)
31+
- {webmaster_email}, {current_url}, {current_path}, {current_query_string}
32+
- {template_name}, {template_group}, {template_group_id}, {template_id}, {template_type}
33+
- {is_ajax_request}, {is_live_preview_request}
34+
6. Parse {in_group()} and [segment variables](templates/globals/url-segments.md)
3335
7. Parse [embed variables](templates/embedding.md#embedding-variables)
3436
8. Parse [layout variables](templates/layouts.md#layout-variables)
3537
9. Parse [date formatting string constants](templates/date-variable-formatting.md#date-formatting-constants)
3638
10. Parse [{template_edit_date}](templates/globals/single-variables.md#template_edit_date)
3739
11. Parse [{current_time}](templates/globals/single-variables.md#current_time)
38-
12. If present, get [cached template](optimization/caching.md#template-caching), then skip to the **advanced conditionals** parsing stage
40+
12. If present, get [cached template](optimization/caching.md#template-caching), then skip to the **second conditionals** parsing stage
3941
13. Parse [PHP on Input](templates/overview.md#php-parsing-stage)
4042
14. Parse [conditional tags](templates/conditionals.md)
4143
15. Assign and parse [preload_replace variables](templates/globals/preload-replacement.md)
@@ -44,52 +46,63 @@ The Template Engine processes the selected template fully from top to bottom thr
4446
- If any module's [{if no_results}](channels/entries.md#if-no_results) tag pair evaluates true, a [{redirect}](templates/globals/single-variables.md#redirect) variable within the tag pair will be processed immediately.
4547
17. Parse [PHP on Output](templates/overview.md#php-parsing-stage)
4648
18. Write **template to cache file**
47-
19. Parse [conditional tags](templates/conditionals.md)
48-
20. Process [template layouts](templates/layouts.md)
49-
21. Process [embedded templates](templates/embedding.md)
50-
22. Process [redirect variable](templates/globals/single-variables.md#redirect)
51-
23. Parse [template-variables](templates/variable.md)
52-
24. Parse some [standard global variables](templates/globals/single-variables.md) (separately, in order given):
53-
- {hits}
54-
- {ip_address}
55-
- {ip_hostname}
56-
- {homepage}
57-
- {cp_url}
58-
- {site_name}
59-
- {site_url}
60-
- {site_index}
61-
- {webmaster_email}
62-
- {stylesheet}
63-
- {encode}
64-
- {debug_mode}
65-
- {gzip_mode}
66-
- {app_version}
67-
- {version}
49+
19. Parse [conditional tags](templates/conditionals.md) a second time to catch conditionals for variables and forms that shouldn't get cached
50+
20. Process [template layouts](templates/layouts.md) {layout=}
51+
21. Process [embedded templates](templates/embedding.md) {embed=}
52+
22. Process the first remaining [{redirect=} tag](templates/globals/single-variables.md#redirect)
53+
23. Parse [Site Template Variables](templates/variable.md) and [Global Template Variables](templates/globals/single-variables.md) again, all at once, including:
6854
- {app_build}
55+
- {app_version}
6956
- {build}
7057
- {charset}
71-
- {lang}
58+
- {cp_session_id}
59+
- {cp_url}
60+
- {current_path}
61+
- {current_query_string}
62+
- {current_url}
63+
- {debug_mode}
7264
- {doc_url}
73-
- {password_max_length}
74-
- {theme_folder_url}
75-
- {member_profile_link}
76-
- {captcha}
77-
25. Add [CSRF tokens](development/guidelines/security.md#cross-site-request-forgery) to forms and parse [{csrf_token}](templates/globals/single-variables.md#csrf_token)
78-
26. Parse remaining [standard global variables](templates/globals/single-variables.md) (separately, in order given):
79-
- {member_id}
80-
- {group_id}
65+
- {email}
8166
- {group_description}
67+
- {group_id}
8268
- {group_title}
69+
- {gzip_mode}
70+
- {hits}
71+
- {homepage}
72+
- {ip_address}
73+
- {ip_hostname}
74+
- {is_ajax_request}
75+
- {lang}
76+
- {last_segment}
8377
- {member_group}
84-
- {username}
78+
- {member_id}
79+
- {member_profile_link}
80+
- {password_max_length}
81+
- {private_messages}
8582
- {screen_name}
86-
- {email}
87-
- {ip_address}
88-
- {location}
89-
- {total_entries}
83+
- {site_description}
84+
- {site_id}
85+
- {site_index}
86+
- {site_label}
87+
- {site_name}
88+
- {site_short_name}
89+
- {site_url}
90+
- {template_group_id}
91+
- {template_group}
92+
- {template_id}
93+
- {template_name}
94+
- {template_type}
95+
- {theme_folder_url}
96+
- {theme_user_folder_url}
9097
- {total_comments}
91-
- {private_messages}
98+
- {total_entries}
9299
- {total_forum_posts}
93-
- {total_forum_topics}
94100
- {total_forum_replies}
95-
27. Parse [path variables](templates/globals/path.md) (including [{route=...} paths](templates/routes.md))
101+
- {total_forum_topics}
102+
- {username_max_length}
103+
- {username}
104+
- {version_identifier}
105+
- {version}
106+
- {webmaster_email}
107+
24. Process [{stylesheet=}](templates/globals/stylesheet.md) / [{encode=}](templates/globals/single-variables.md#encode) / [{path=}](templates/globals/path.md) / [{route=}](templates/routes.md) tags and variables
108+
25. Add [CSRF tokens](development/guidelines/security.md#cross-site-request-forgery) to forms and parse [{csrf_token}](templates/globals/single-variables.md#csrf_token)

0 commit comments

Comments
 (0)