Dynamic character list on wiki page.

Hades_1701

Not sure if this is a feature request or simply a question on how to do something, so sorry if this is the wrong place!

I have a wiki page for a ship, and a set of characters with a tag identifying them as members of its crew. I currently have a list of the crew on the ship's wiki page, each item being simply a link to a character. What I'd _like_ to do is have that list generated automatically based on the character tag. Is there a way to do this?

 

Thanks in advance!

 

Comments

  • Abersade
    Abersade
    Posts: 629

    Smells of javascript to me, since it requires adding content to a page dynamically which doesn't exist on that page already. Unfortunately I can't be of any assistance on that as I don't dabble in that particular dark art, but I'm betting that our resident JS sorcerers can help.

    GM of Stream of Kairos - 2025 Campaign of the Year

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    Need CSS Help? It may be covered here: Abersade's CSS Hub

  • Abersade
    Abersade
    Posts: 629 edited June 2024

    I agree that this might make for a worthwhile feature though, to have a widget that can be inserted onto any page that displays a list of every character (or page) with a specific tag.

    I can think of many scenarios where such a thing would be useful.
    Post edited by Abersade on

    GM of Stream of Kairos - 2025 Campaign of the Year

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    Need CSS Help? It may be covered here: Abersade's CSS Hub

  • nuadaria
    nuadaria
    Posts: 69

    First blush says this would need a way to retrieve said list and the OP API has been paused for a bit now. Let me mull this over, to see if it could be done without summoning an elder god...

  • ragnarhawk
    Posts: 172

    @thaen, I know that we can get the entire list of wiki pages with https://campaignurl.obsidianportal.com/content_summary_gm.json...

    Is it possible to get that content filtered with a modified url?

  • vadercomplex
    vadercomplex
    Posts: 267

    Hey guys! I went ahead and sent this to @Thaen. :~) 

    Obsidian Portal Support Druid | [email protected]

  • nuadaria
    nuadaria
    Posts: 69

    @Rocket_Surgery I have managed to get this working with some javascript if you don't mind the dark arts.



    You can see it here though you'll have to enable javascript for that site to see it in action. It isn't at all elegant BUT it is functional as a proof of concept. Feel free to punch it up.



    Here's a gist with the two bits you need.

     

    There is a comment there that explains basic usage, but in short you need to add that <div> to the page(s) you want to add this to, and then toss that javascript into one of the js fields in advanced settings for your game. It should do the trick after that.

     

    SIDENOTE:  Each visitor WILL have to enable js for the game, but thankfully that's a one and done thing.

  • thaen
    thaen
    Posts: 1,130

    @nuadaria, nice solution!

    Obsidian Portal Developer

  • thaen
    thaen
    Posts: 1,130

    To avoid the requirement to accept Custom JavaScript, this could be turned into a WikiPage DST or Item DST. Depending on how fancy you wanted to get, it could just have a place for some text at the top, and the list at the bottom. Or possibly something like the JavaScript insert buttons where it has a format that it looks for in the text and replaces that with the list, so there could potentially be multiple lists on the page.

    https://forums.obsidianportal.com/discussion/6671/dsts-for-wiki-pages-and-items/p1

     

    Obsidian Portal Developer

  • nuadaria
    nuadaria
    Posts: 69 edited June 2024
    Removed my previous post... I totally though this was about my other thing... teach me to respond to things before coffee...

    I think this might be useful enough to make into a DST. Another project for me :)
    Post edited by nuadaria on
  • nuadaria
    nuadaria
    Posts: 69

    @Rocket_Surgery I just created a new DST called Dynamic Tag list that when approved should be available for you on wiki pages for all game systems.

Sign In or Register to comment.

September 2026
City of Shadows

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions