Tmplz Tags |
Include Tags: RemoveThe Remove tag can remove Slots and Sections from an included template. Although not absolutely essential, it can help eliminate clutter in templates and slightly improve their performance. Example: [$Include foo.html] [$Remove Section X] [$Remove Slot Y] [$Include] The template above assumes that foo.html has a top-level Section named X, and a top-level Slot named Y, and removes both of them. The original foo.html is unaffected; the changes are only made to the copy included into the current template. Removing tags after showing themAs noted earlier, Show does not "destroy" the Section. The Remove tag can be used after a Show to prevent the original Section from appearing in the final template. In the following example, Section X is shown twice, then removed: [$Include foo.html] [$Show X][$Fillin Y]Hello[$Fillin][$Show] [$Show X][$Fillin Y]World[$Fillin][$Show] [$Remove Section X] [$Include] If one attempted to add another "Slot" and "Section" Are OptionalLike Rename, Remove does not have to specify whether it is removing a Slot or Section. If a Section and a Slot have the same name, a single Remove tag can remove both. Example: [$Include foo.html] [$Remove X] [$Include] Order of Remove tagsAs with Fillin, Show & Rename, Remove tags do not have to appear in the same order as the Slots and Sections they rename. Show and/or Fillin tags that follow the Remove cannot reference the removed element, however. "Deep" RemovesThis works much like deep Fillin, Show & Rename. To remove a Section or Slot that is buried several levels deep within a template, just separate the parent tags with "." characters: [$Remove Slot S1.S2.S3.S4] In the above example, S1, S2 & S3 are Sections, and S4 is a Slot. Only S4 will be removed. Next page: Remove |