Page 1 of 1

Outputclass attribute in web responsive tiles

Posted: Fri Jun 22, 2018 9:00 pm
by mdslup
I'm creating an internal documentation portal - it's a ditamap full of topicrefs. Each topicref points to a location where documentation is held.

Some documentation is available to everyone, while some is only available internally; I'd like to color code the tiles appropriately. I thought I could add an outputclass to each topicref and see if show up in the class of the wh_tile, but it only seems to apply in the toplevel menu.

Can anyone help me figure out another way to color code tiles, or am I missing something about outputclass in this particular case?

Re: Outputclass attribute in web responsive tiles

Posted: Tue Jun 26, 2018 10:46 am
by radu_pisoi
Hi,

Indeed, the topicref/@outputclass information should be transferred to associated tile in the HTML page. I have registered this problem in our internal issue tracker to be fixed in a future version.

Meanwhile, please use one of the following workarounds:

1. Add wh-tile meta information in the topicref, something like:

Code: Select all

<topicref href="topics/care.dita" chunk="to-content">
<topicmeta>
<data name="wh-tile" outputclass="class-care"></data>
</topicmeta>
...
</topicref>
2. Modify your CSS to use the topic's ID. The ID of the referenced topic is copied in the data-id attribute.

Code: Select all

<div class=" wh_tile class-care " data-id="care">

Re: Outputclass attribute in web responsive tiles

Posted: Tue Jun 26, 2018 9:42 pm
by mdslup
This worked, thanks.