Create a custom HTX function
To create a custom HTX function you inherit the class HtxExtension
and override the functions Execute and optionally ExecuteClose.
Execute and ExecuteClose is run on the same object, so it’s safe to store values from Execute and use them in ExecuteClose.
The content parameter passed to ExecuteClose is the parsed content from between the opening and the closing tag.
The name of the function will be as defined in the HtxExtension-attribute placed on the class.
See this example from the <z:sendmail
-function:
In addition you’ll need a class inheriting from ZpiderPlugin to let Zpider know that there’s a plugin in the DLL that needs to be loaded, and you’ll need a description.json that tells Zpider what to load.
SendMailPlugin.cs:
description.json:
Wrap it in a folder and place it in the Plugins folder in Zpider. It should then show up in the plugin administration in the new admin after a restart.
The folder structure should look like this