Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Parse order of MODX tags

yamamoto edited this page Dec 18, 2016 · 1 revision

This is small notes. I will write new issue, after future.

<html>
<head>
    <title>[(site_name)]</title>
</head>
<body>
    {{header}}
    [*content*]
    [[sidebar?title=`[*menutitle*]`]]
    {{footer}}
    [*script*]
</body>
</html>

If there is such a code as above, in the current Evo it is parsed as follows.

  1. [*content*]
  2. [*menutitle*]
  3. [*script*]
  4. [(site_name)]
  5. {{header}}
  6. {{footer}}
  7. sidebar

They are parsed in the above order. However, this is the order that the user does not intend. Therefore, problems may occur.

  1. [(site_name)]
  2. {{header}}
  3. [*content*]
  4. [*menutitle*]
  5. sidebar
  6. {{footer}}
  7. [*script*]

As above, you should parse in order from the top. And if it is nested, from inside. This order is understood by the user.

Clone this wiki locally