FG Spreadshirt Swag
  1. #1
    Samarex's Avatar
    Join Date
    Sep 2015
    Location
    Philippines
    Posts
    1,029

    Linking a Table inside a formattedtext

    Hello, been trying do do this with no luck.
    I have a table that is inside a formatted text section and it appears fine when viewing The Shaman Class. But in another section I have a tables Menu and I can get other tables to open
    in a window but not the table in the shaman text section I have attached my XML and a mod version. (this has just the basic information in the code to show the problem didn't want someone to have to figure everything out.
    (you might ask why so many boxes. there is allot more but I removed most to make it smaller code.)
    If you run the 3.5Example mod
    1- After clicking Classes,Var Classes and Shaman you will see that the Table shows up just fine.
    2-Reference Tables brings up Ageing Effects and Class Tables ( Aging Effects works fine and Class Tables opens its Menu.
    3-Again Aging Effects works fine but the 2 shamantable links just come up blank text window and no code error on console.

    So is it possible to pull this table out of the text. I want the table in both sections but I really don't want the table actually put in twice and I don't really want to use a link inside the textfield to open the table in a window while viewing the Class Shaman...

    Im still new at FG so trying to figure some things out but its Fun.....
    Thank You
    Russ

  2. #2
    Once an XML tag in a FG data module specifies a "type" attribute, that becomes a leaf node in the FG database. Any tags under this are purely treated as data for that leaf node, and are not accessible to

    This code is not correct, because you are attempting to embed a formattedtext node within another formattedtext node.

    Code:
    					<text type="formattedtext">												
    					<h>Class Features</h>						
    					<p>Feature Text</p>													
    						<shamantable>	
    							<name type="string">The Shaman</name>
    								<text type="formattedtext">
    									<table>							
    										<tr><td colspan="9"><b>Table 1: The Shaman</b></td></tr>
    										<tr><td><b>Level</b></td><td colspan="2"><b>Base Attack</b></td><td><b>Fort</b></td><td><b>Ref</b></td><td><b>Will</b></td><td colspan="3"><b>Special</b></td></tr>			
    									</table>
    								</text>
    						</shamantable>											
    					</text>
    You would need to set up the table as it's own record in a separate part of the XML. Then, include a link to the table from any other formattedtext field field you want to reference it.

    Regards,
    JPG

  3. #3
    Samarex's Avatar
    Join Date
    Sep 2015
    Location
    Philippines
    Posts
    1,029
    Ok Thanks I was afraid of that. The embedding was just a attempt to try and do it. its not how all my code is. So since I can't it will be removed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in