• Resolved rwcommm

    (@rwcommm)


    In the Page Builder Editor window, under “Widget Styles > Attributes” one can assign a CSS class name to the widget. But a widget panel in page source view shows no such class assignment to the widget div (only the generic, function-assigned class). What is this input box for? I would like to link to the widget from elsewhere on website using an “a” tag. Doing so (<a href=".widget-class">) could send visitor directly to content in a widget panel on the page so visitor doesn’t have to scroll.

    https://ww.wp.xz.cn/plugins/black-studio-tinymce-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marco Chiesi

    (@marcochiesi)

    Please note that your question is about the Page Builder plugin, while this is the support forum for Black Studio TinyMCE Widget.
    Anyway, what you want to achieve requires you to use IDs, not classes.
    Links to anchors will look like this:
    <a href="#anchor">Link text</a>
    where anchor is the ID of the element you want to link to (target).

    Page Builder automatically assigns IDs to rows, cells, i.e.:

    <div class="panel-grid" id="pg-5681-0"><div class="panel-grid-cell" id="pgc-5681-0-0"><div class="so-panel widget widget_black-studio-tinymce widget_black_studio_tinymce panel-first-child panel-last-child" id="panel-5681-0-0-0"><div class="textwidget"><p><a id="anchor"></a><br> Hello</p>
    </div></div></div></div>

    where:

    • pg-5681-0 is the id of the row
    • pgc-5681-0-0 is the id of the cell
    • panel-5681-0-0-0 is the id of the single widget

    so if you want to link the widget you’ll use:
    <a href="#panel-5681-0-0-0">Link text</a>

    Of course you will need to inspect the HTML source code generated by Page Builder to discover the IDs.

    Alternatively, you can explicitely insert an (invisible) anchor element inside the widget text (you’ll have to switch to text mode), i.e.:
    <a id="my-anchor"></a>
    and link to it as usual:
    <a href="#my-anchor">Link text</a>

    Thread Starter rwcommm

    (@rwcommm)

    Way Cool. Makes complete sense. Thanks so much for the assist — even though my query overlapped with another plugin (your TinyMCE widget in Site Origins Page Builder cell). I lost track of who was who at the moment. ~Don

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How is "Widget Class" assigned?’ is closed to new replies.