Using a table with ever expanding data

Krothos
Krothos

In my current campaign Shattered Star, I update the Wiki weekly to including new creatures/items that the characters encountered in the previous gaming session. This has resulting in a long column of links on the main Wiki page. So, I started playing with tables and been some what successful with them. But I can't figure out how to make a table that will allow me to easily add new items without having to "reinvent the wheel" if I want to keep my Wiki links alphabetical.

Is there a method that will auto adjust a table with the specified data at 3 columns with unlimited rows, allowing me to freely adding new data so that it "reformats" the table upon saving?

I hope this makes sense....  :)

 

Comments

  • Krothos
    Krothos
    Posts: 230

    In case you want to look at what I have currently....

    https://shattered-star-15.obsidianportal.com/wikis/main-page

     

  • alex_redeye
    alex_redeye
    Posts: 85

    Take a look at what I do with the Wiki on my DA Campaign.  It looks like you might be able to benefit from a similar format.

    -Red

    Campaigns: Dragon Age: Requiem

  • cgregory
    cgregory
    Posts: 777

    In order for a table to be sortable you need to use javascript.

    Are  you talking about the table for Onos Pathfinder Journal?  Or are you talking about changing up you links to be in a table?

    If you are thinking about putting your links in a table, I'd suggest putting them in a list instead. Then styling that list like you would a calendar (but a 3 day week calendar rather than 7 days)

    For example if you played around with the code here

    http://www.w3schools.com/howto/howto_css_calendar.asp

    You could make the calendar "days" be you links then just have them wrap around as needed (basically you just need to change the width from 13.6% to 33% to change from 7 columns to 3 colums)

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

  • Krothos
    Krothos
    Posts: 230

    @alex_redeye I don't see a Wiki page on your DA campaign. Are you referring to your Contrivances page? I just started using the Items page myself a moment ago. BTW, very nice campaign page!

    @cgregory Yeah, adding new links to an established table. As you saw, I already created Onos's Pathfinder Journal in a table. That was easy because it's sequential. The other sections are not so much since I add the links as the character encounters. You mention Java Script, which I imagine is beyond the scope of what this website will support (and I'm still trying to grasp CSS scripting so it's also beyond my scope, lol). I'll try to work with this "calendar" format you mentioned. Thank you.

     

  • Bortas
    Bortas
    Posts: 645

    Why use a table?

    Why not use an unordered list, inside a div, then CSS style that div however you want, to have as many columns as you want?

    In your html, it would simply be an <li>blahtidiblah</li>, put wherever you want it. Do all the presentation in CSS.

    -bort

  • cgregory
    cgregory
    Posts: 777

    Bortas, that is what i suggested with the calendar example. It uses lists.

    Here is an example

    For CSS

    .mylist li {

        list-style-type: none;

        display: inline-block;

        width: 30%;

        text-align: center;

        margin-bottom: 5px;

        font-size:12px;

        color:#777;

    }

    For html

    <ul class="mylist">

      <li>[[Character Creation | Character Creation]]</li>

      <li>[[Captain | Captain]]</li>

      <li>[[Crossing the Boards | Crossing the Boards]]</li>

      <li>[[Feats | Feats]]</li>

      <li>5</li>

      <li>6</li>

      <li>7</li>

      <li>8</li>

      <li>9</li> 

    </ul>

     

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

  • Krothos
    Krothos
    Posts: 230

    Thank you for the suggestions. Much appreciated. I have to figure out what I'm doing wrong because the script is appearing as normal text after saving. It must be another script that is conflicting with this language. The only thing that is working is using the vertical lines separating the links to create the table.

     

  • cgregory
    cgregory
    Posts: 777

    You could try reducing the width percentage it might be too high.

    when I get in front of an actual computer i can look at your custom css to see what is wrong.

    They are among us!

    image

                       XCom: Defiance - Campaign of the Month November 2016

     

     

  • alex_redeye
    alex_redeye
    Posts: 85

    As an FYI, the Wiki on my DA Campaign is the Codex section.

    -Red

    Campaigns: Dragon Age: Requiem

Sign In or Register to comment.

January 2022
Lakes of Blood and Ash

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