Opencart Vqmod Attribute,Position
Vqmod Attributes:
1. attribute "error" = this is three types log|skip|abort.
1. attribute "error" = this is three types log|skip|abort.
- skip = skip means it will simply ignore this file.
- log = log is the same as skip. but logs the error. (default)
- abort = abort means to log the error and cancel the remaining operations in that particular xml script.
2. attribute "position" = this is seven types before|after|replace|top|bottom|ibefore|iafter.
- before = before will insert the add data before the search data.
- after = after will insert the add data after the search data
- replace = replace will replace the data in the search tag with the data in the add tag. (default)
- top = top will insert the add data at the top of the file. The search data is ignored.
- bottom = bottom will insert the add data at the bottom of the file. The search data is ignored.
- ibefore = ibefore will insert the code before the search inline instead of the line before
- iafter = iafter will insert the code after the search inline instead of the line before
3. attribute "trim" set to true|false.
- true will trim away whitespace and linebreaks.
- leave out or set to true to trim. (default is true)
4. attribute "regex" set to true|false.
- If true, the search data should be a valid regex pattern
- Leave out or set to FALSE to use normal string search (default)
- Does not apply to ibefore and iafter
5. attribute "index" for specifying which instances of a search tag should be acted on.
- If the search string is "echo" and there are 5 echos in the file, but only want to replace the 1st and 3rd, use index="1,3"
- Comma delimited for multiple instances starting with "1"
- Leave out or set to FALSE to replace all instances. (default)
6. attribute "offset" to work with the position
- if the search position is before and offset 3 it will put the add data before the line, 3 lines above the searched line
- if the search position is after and offset 3 it will put the add data after the line, 3 lines below the searched line
- if the search position is replace and offset 3 it will remove the code from the search line and the next 3 lines and replace it with the add data
- if the search position is top and offset 3 it will put the code before the line, 3 lines below the top of the file
- if the search position is bottom and offset 3 it will put the code after the line, 3 lines above the bottom of the file