• Resolved !Benni

    (@benniledl)


    Hello!

    I really need the functionality to change the title that appears in the table of contents independent from the content of the <h*> tag. maybe something like this

    <h* toc="Short title for TOC">Long title that is displayed in the page but looks stupidly long in the toc</h*>

    Could you consider adding this as a feature?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Gilbert Hernandez

    (@ghernkadence)

    Hello @benniledl,

    I tested the TOC block and can understand your scenario. There aren’t options to show a custom link in the TOC when you have a long heading. However, I passed the feature request onto the developers to review.

    Unfortunately, I don’t have a workaround for you. You can use JS to target the specific link and update the text, but you must develop the JS yourself.

    Thread Starter !Benni

    (@benniledl)

    Hello, Thanks for your answer!!

    I have added this line:

    $heading->textContent = $heading->getAttribute('toc') ? $heading->getAttribute('toc') : $heading->textContent;

    To kadence-blocks/includes/class-kadence-blocks-table-of-contents.php after line 581

    And I am now using the plugin Attributes for Blocks to add the toc=”” attribute to the heading. I would so love if you could implement this to your plugin.

    If you do not want to add the functionality to add custom attributes to blocks, could you at least add the php line that I posted to your plugin? This would not alter any functionality for existing users but would add the functionality to use the toc=”” attribute instead of the heading for users who are willing to combine that with the attributes for blocks plugin.

    I think that the only pretty and good functioning TOC out there comes from your plugin, but I really need this functionality ??

    Thread Starter !Benni

    (@benniledl)

    I submitted a pull request for this feature: https://github.com/stellarwp/kadence-blocks/pull/423

    @ghernkadence

    Plugin Support michael-levelup

    (@michaeltarongoy)

    Hi there,

    New feature/options go straight into a strategy board where they will be reviewed by the Development team. We take certain factors into account when deciding which features/settings to build and which to remain pending.

    And from what I can see on the pull request, this has been added.

    We appreciate your continued patience and understanding regarding this matter.

    Please note that you can also submit a support ticket via these channels.

    If you need further assistance, please don’t hesitate to reach out to us again.
     
    Kind Regards,
    Michael Taro

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.