Skip to content

Instantly share code, notes, and snippets.

@andrew-serrano
Created August 5, 2019 21:18
Show Gist options
  • Save andrew-serrano/2e0dd1af10942d313fe6f945b172f4b2 to your computer and use it in GitHub Desktop.
Save andrew-serrano/2e0dd1af10942d313fe6f945b172f4b2 to your computer and use it in GitHub Desktop.
Load a module item with template
<mvt:comment>
Load item
</mvt:comment>
<mvt:do file="g.Module_Feature_TUI_DB" name="l.success" value="Item_Load_Code('PaypalExButton', l.item)" />
<mvt:comment>
Load module that the item references
</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="Module_Load_ID(l.item:module_id, l.item:module)" />
<mvt:comment>
Load template we would like to use in conjunction with the module
</mvt:comment>
<mvt:do file="g.Module_Feature_TUI_DB" name="l.success" value="ManagedTemplate_Load_Filename('bask-PaypalExButton.mvc', l.template)" />
<mvt:comment>
Item Structure to render
</mvt:comment>
<mvt:assign name="l.settings:PaypalExButton:template_filename" value="l.template:filename" />
<mvt:assign name="l.settings:PaypalExButton:template_id" value="l.template:id" />
<mvt:comment>
Module Render Settings / Item
</mvt:comment>
<mvt:do file="g.Module_Root $ l.item:module:module" name="l.success" value="ComponentModule_Prerender(l.item:module, l.item, l.settings, l.settings:PaypalExButton, '')" />
<mvt:do file="g.Module_Root $ l.item:module:module" name="l.success" value="ComponentModule_Render_Start(l.item:module, l.item, l.settings, l.settings:PaypalExButton, '')" />
<mvt:do file="g.Module_Root $ l.item:module:module" name="l.success" value="ComponentModule_Render_End(l.item:module, l.item, l.settings, l.settings:PaypalExButton, '')" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment