• Hi Cool Plugins team,
    I really like your plugin, it looks great and is simple to use.
    I’m contacting you because there is one feature that is missing that would be very useful in my use case: HTML anchors.
    I intend on using your plugin to make a fairly long timeline of historical events, and it would be great if I can have link in my other posts that redirect to a specific entry in the timeline (or even links within the timeline itself).
    The most bare bone implementation would be to allow to user to enter a anchor name manually just like WordPress is doing it with its standard blocks. I believe it would be possible to have an appended index (i.e. archorname-1, archorname-2,…). The ideal solution would be to sluggify the date/year section as it would be resilient to reordering.
    Thank you!

    • This topic was modified 3 years, 3 months ago by drmint.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Jyoti Bhandari

    (@jyoti197)

    Hi @drmint,

    Thanks for showing interest in our plugin and for the suggestion.
    1) We will integrate this feature in the upcoming version of our plugin.
    2) Could you explain little bit more (resilient to reordering feature) or if possible please describe it with the help of screenshot so we will easily understand.

    Thanks & Regards

    Thread Starter drmint

    (@drmint)

    Hi @jyoti197,

    Thank you very much for your response, this is awesome news!
    So, what I meant by “resilient to reordering” is the ability to reorder the stories (or add/remove some) without modifying the anchor names of the already existing stories.

    This mostly refers to an implementation where the automatically generated anchor name is the index of the story. Let’s say I have three stories right now:

    – 313 -> Edict of Milan
    – 449 -> Britannia is invaded by the Anglo-Saxons
    – 476 -> The Western Roman Empire falls

    If I want to redirect my visitors to the third story, I would create a link https://example.com/path/to/timeline/#timeline-3

    But then if I end up adding a fourth story in between 313 and 449 (something like 379 -> Theodosius I becomes emperor), then all the subsequent stories’ anchor names have been shifted by 1 with #timeline-3 now referring to my 449 story.

    Anyway, so automatically generating anchor names based on their index would be a bad idea as it would require never modifying the timeline or changing a lot of links every time I do.

    A simpler approach would be to let the user manually add the anchor name. If we suppose the user makes each of them unique, it would be resilient to reordering or adding/removing stories. However it would be more work to set up.

    In my situation, the best approach would be to slugify the story’s “Date / Custom Text.” Assuming each one is unique, it would also generate unique anchor names that allows adding/reordering/removing stories.

    But I imagine some people might want to have the same “Date / Custom Text” for multiple stories, so maybe the very best option would be to have manual anchor names by default and then an option to automatically generate the anchor names using the the stories’ “Date / Custom Text” value.

    Lastly, if multiple timelines are present in the same webpage, it would be useful to be able to append the generated anchor names with the whole timeline anchor name.

    Here one example:

    – First timeline (manual anchor name: timeline)
    — First story (The date is 313 so the anchor name is timeline-313)
    — Second story (The date is 449, anchor name is timeline-449)
    — …

    – Second timeline (manual anchor name: other-timeline)
    — First story (The date is 28/1/1986, anchor name is other-timeline-28-1-1986)
    — …

    I believe even with manual stories anchor name, it should append this global timeline anchor name, that way the user doesn’t have to verify that the anchor is unique throughout multiple timelines on the same webpage.

    In conclusion, I would be perfectly satisfied with manually added anchor names, but if you want to go the extra mile and adding a automated generation process, slugifying the “Date / Custom Text” for each story would be the best approach in my opinion.

    Thanks again for your positive response, this is highly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[FEATURE] HTML anchors’ is closed to new replies.