PDA

View Full Version : Links in ref manual.



Kathorus
May 6th, 2020, 18:40
Greetings. It is likely I have missed something, somewhere. What I believe I am doing is creating 'inline' reference pages. I would like the first page of a subchapter to be an overview and have links to specific pages. I have highlighted the place I think I should be putting the link reference, along with the refpage I'm trying to use. I have tried various incarnations of this, including listing each parent tag in dot notation (reference.referencemanual.chapters.chapter_01.sub chapters.subchp1.refpages.refpage_001) with and without "@5E Expanded PHB" (the name of the thing) and various combinations of those things. Most times I get a box to pop up, but it is always empty, other times I get errors (which seemingly makes me think I am sometimes close to an answer). Any help would be appreciated. Also, this is my first attempt at doing this so I might need more verbose explanations for 'common' things.

My basic XML is

<reference>
<referencemanual>
<chapters>
<chapter_01>
<subchapters>
<subchp1>
<refpages>
<refpages>
<refpage_000>
<listlink type="windowreference">
<class>reference_manualtextwide</class>
<recordname>..</recordname>
<description field="name" />
</listlink>
<name type="string">The Order of Combat</name>
<blocks>
<combatorder>
<blocktype type="string">text</blocktype>
<text type="formattedtext">
<link type="windowreference" class="reference_manualtextwide" recordname="refpage_001"><b>Combat:</b> Surprise</link>
</text>
</combatorder>
</blocks>
<keywords type="string"></keywords>
</refpage_000>
<refpage_001>
<listlink type="windowreference">
<class>reference_manualtextwide</class>
<recordname>..</recordname>
<description field="name" />
</listlink>
<name type="string">Surprise</name>
<blocks>
<surprise>
<text type="formattedtext">
<h>Surprise</h>
<p>Here is the text.</p>
</text>
</surprise>
</blocks>
<keywords type="string"></keywords>
</refpage_001>
... closing tags omitted

Mortar
May 7th, 2020, 00:53
If those two <refpages> tags are like that in your module this way it will always throw an error.

34975

Mortar
May 7th, 2020, 01:07
You need to use referencemanualpage as the windowclass to get those links to work correctly. Try this:



<reference>
<referencemanual>
<chapters>
<chapter_01>
<subchapters>
<subchp1>
<refpages>
<refpage_000>
<listlink type="windowreference">
<class>reference_manualtextwide</class>
<recordname>..</recordname>
<description field="name" />
</listlink>
<name type="string">The Order of Combat</name>
<blocks>
<combatorder>
<blocktype type="string">text</blocktype>
<text type="formattedtext">
<link type="windowreference" class="referencemanualpage" recordname="reference.referencemanual.chapters.chapter_01.subc hapters.subchap1.refpages.refpage_001"><b>Combat:</b> Surprise</link>
</text>
</combatorder>
</blocks>
<keywords type="string"></keywords>
</refpage_000>
<refpage_001>
<listlink type="windowreference">
<class>referencemanualpage</class>
<recordname>..</recordname>
<description field="name" />
</listlink>
<name type="string">Surprise</name>
<blocks>
<surprise>
<text type="formattedtext">
<h>Surprise</h>
<p>Here is the text.</p>
</text>
</surprise>
</blocks>
<keywords type="string"></keywords>
</refpage_001>
</refpages>
</subchp1>
</subchapters>
</chapter_01>
</chapters>
</referencemanual>
</reference>

Kathorus
May 7th, 2020, 12:00
[QUOTE=Mortar;506167]If those two <refpages> tags are like that in your module this way it will always throw an error.

Sorry, that was a mistype here on my part.

Kathorus
May 7th, 2020, 12:03
I think I've had it setup like this before, and like a few other setups I get a pop-up box with no data.

34992

Moon Wizard
May 8th, 2020, 01:41
The record name needs to always be a full path to the record you want to open. I noticed you didn’t have a full path in your original post.

JPG

Kathorus
May 8th, 2020, 02:51
Thanks

I would swear that I'd tried it this way already, but obviously I missed something. It is working with the following.

recordname="reference.referencemanual.chapters.chapter_01.subc hapters.subchp2.refpages.refpage_001@5E Expanded PHB"

damned
May 8th, 2020, 13:34
Have you tried Author?

Kathorus
May 12th, 2020, 11:32
I had seen mention of it in my searches. I'm pretty comfortable in XML and it seemed like the target for that is people who are not. Currently I have some snippets setup in VSCode that automate a good deal of the tedium and do some leg-work in notepad++ for formatting and tagging the actual text.