Page 1 of 1

Inserting bookmeta metadata into a topic

Posted: Tue Sep 28, 2021 4:49 pm
by matt_k
Hi

I would like to use some bookmeta metadata into a topic within the same map, specifically the "copyrlast" value. I would like the copyright year to display dynamically in a topic holding copyright information.

Here is the metadata:

Code: Select all

		<bookrights class="- topic/data bookmap/bookrights ">
			<copyrlast class="- topic/data bookmap/copyrlast ">
				<year class="- topic/ph bookmap/year ">2021</year>
			</copyrlast>
		</bookrights>
I would like the year to appear in this line:

Code: Select all

<p class="- topic/p ">© Company Name [Insert copyrlast here]</p>
Is there way that I can do this, or should I simply add a keydef to my map with the copyright year, which can be keyref'd into the copyright statement.

Thanks

Matt

Re: Inserting bookmeta metadata into a topic

Posted: Wed Sep 29, 2021 7:17 am
by Radu
Hi Matt,

Maybe indeed you can define a key for the copyright year:

Code: Select all

<keydef keys="copyrightYear">
            <topicmeta>
                <keywords>
                    <keyword>2021</keyword>
                </keywords>
            </topicmeta>
        </keydef>
then refer to that key both in the bookmap:

Code: Select all

<bookrights>
....
            <copyrlast>
                <year><keyword keyref="copyrightYear"/></year>
            </copyrlast>
    ...
        </bookrights>
and as a keyword or ph with keyref in the topic. I did not test the published output but this might work.

Regards,
Radu

Re: Inserting bookmeta metadata into a topic

Posted: Wed Sep 29, 2021 2:06 pm
by matt_k
Hi Radu
Thanks for confirming. That works perfectly.
Matt