SuperAPI AI Directory

help-add

General & other

View repository

Updated 10-15 17:18

About this skill

/help-add — Adding help

Adds built-in help to an object: metadata file Help.xml, HTML page, and if necessary updates form metadata.

Usage

/help-add <ObjectName> [Lang] [SrcDir]
Parameter Required Default Description
ObjectName yes — Object name
Lang no ru Help language code
SrcDir no src Source directory

Command

powershell.exe -NoProfile -File .claude/skills/help-add/scripts/add-help.ps1 -ObjectName "<ObjectName>" [-Lang "<Lang>"] [-SrcDir "<SrcDir>"]

What is created

<SrcDir>/<ObjectName>/
    Ext/
        Help.xml                    # Метаданные справки (namespace extrnprops)
        Help/
            ru.html                 # HTML-страница справки
  • Help.xml — fixed structure with <Page>ru</Page> (namespace http://v8.1c.ru/8.3/xcf/extrnprops)
  • ru.html — HTML 4.0 Transitional with 1C styles connected (v8help://service_book/service_style)
  • Help is not registered в ChildObjects of the root XML — the presence of files is sufficient

What is modified

  • If in the form metadata (Forms/<FormName>.xml) there is no <IncludeHelpInContents> — the script will add <IncludeHelpInContents>false</IncludeHelpInContents> after <FormType>. For forms created via /form-add, the element already exists.

Help button on the form

After creating the help, a button on the form is needed to call it. Add the button Form.StandardCommand.Help to the form's AutoCommandBar (Forms/<FormName>/Ext/Form.xml).

Current AutoCommandBar structure (created by form-add)

<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
    <Autofill>true</Autofill>
</AutoCommandBar>

Needs to be replaced with

<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
    <Autofill>true</Autofill>
    <ChildItems>
        <Button name="ФормаСправка" id="{{свободный_id}}">
            <Type>CommandBarButton</Type>
            <CommandName>Form.StandardCommand.Help</CommandName>
            <ExtendedTooltip name="ФормаСправкаExtendedTooltip" id="{{свободный_id + 1}}"/>
        </Button>
    </ChildItems>
</AutoCommandBar>

Choosing id

Review all id="..." в Form.xml and choose the next free numeric id. Usually ids start at 1 and go consecutively. The button needs 2 ids: one for Button, one for ExtendedTooltip.

Important

  • Form.StandardCommand.Help — standard platform command, no need to declare in <Commands>
  • No handler in Module.bsl is required — the platform itself will find Help.xml and open the HTML

Editing help

After creation, the help content is regular HTML. Edit Ext/Help/ru.html in accordance with the object's purpose. Standard HTML markup is supported: <h1>..<h4>, <p>, <ul>, <ol>, <table>, <strong>, <em>, <a>, <pre>.