Expand tree when clicking on topic reference

Post here questions and problems related to editing and publishing DITA content.
patrick-kox
Posts: 13
Joined: Sat Jun 23, 2018 4:57 pm

Expand tree when clicking on topic reference

Post by patrick-kox »

Is it possible to make the webhelp responsive expand the tree node when clicking on the name?

As it works by default (at least for me) the tree expands when clicking on the greater than (>) sign but it opens the first topic when clicking on the name. I would like to have clicking the name to also extend the tree.

Patrick
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: Expand tree when clicking on topic reference

Post by Costin »

Hi Patrick,

Actually, clicking the name of a parent node (topic title) in the tree does expand the tree, as you can see from the below screen recording I made .

I used oXygen XML Editor v20.1 to verify the behavior and it seems OK.
If the title you click in the side TOC corresponds to a topic that does have content, the tree is expanded showing the topic's children and the topic's content is displayed.
In case the title you click on corresponds to an entry used only for topic organizing purposes (like a topichead - which is a title-only entry in a navigation map), the children tree is expanded and the first child content is displayed.

Image

Let me know if I misunderstood your use-case.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
patrick-kox
Posts: 13
Joined: Sat Jun 23, 2018 4:57 pm

Re: Expand tree when clicking on topic reference

Post by patrick-kox »

Hi Costin,

I've uploaded my site to http://sandbox.commandoregel.com/ so you can check. When I click the > it expands the tree but when I click on "De CLI Tools" for example, it jumps to the Topic called "Apropos"

Maybe my DITA Map is incorrect ? (I'm still a beginner)
here is the map:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map audience="expert novice" platform="linux" xml:lang="en" base="commandoregel.com"
title="commandoregel.com">
<title>https://commandoregel.com</title>
<topicmeta>
<navtitle>commandoregel.com</navtitle>
<shortdesc>Leer de Linux commandoregel</shortdesc>
<author type="contributor">patrick</author>
<critdates>
<!--patrick-->
<revised modified="2018/09/23"/>
</critdates>
<keywords>
<indexterm>commandoregel.com</indexterm>
</keywords>
</topicmeta>
<topichead navtitle="Over" locktitle="yes" audience="novice" base="Over deze site">
<topicmeta>
<shortdesc>Meer informatie over dit project.</shortdesc>
</topicmeta>
<topicref href="inleiding.dita" locktitle="yes"/>
<topicref href="introductie.dita"/>
<topicref href="over.dita"/>
</topichead>
<topicref navtitle="Meta Characters" locktitle="yes">
<topicmeta>
<shortdesc>Meta characters zijn speciale tekens om bepaalde geavanceerde bewerkingen te
doen.</shortdesc>
</topicmeta>
<topicref href="amper.dita"/>
<topicref href="puntcomma.dita"/>
<topicref href="pipe.dita"/>
<topicref href="redirects.dita"/>
</topicref>
<topicref navtitle="De CLI Tools">
<topicmeta>
<shortdesc>De Commandoregel Tools, dit is waar heel deze site om draait. Deze lijst
wordt regelmatig bijgewerkt met nieuwe tools.</shortdesc>
</topicmeta>
<topicref href="apropos.dita"/>
<topicref href="apt.dita"/>
<topicref href="bash.dita"/>
<topicref href="bmon.dita"/>
<topicref href="capinfos.dita"/>
<topicref href="cat.dita"/>
<topicref href="cd.dita"/>
<topicref href="cp.dita"/>
<topicref href="dd.dita"/>
<topicref href="df.dita"/>
<topicref href="dmesg.dita"/>
<topicref href="dnf.dita"/>
<topicref href="emacs.dita"/>
<topicref href="fdisk.dita"/>
<topicref href="git.dita"/>
<topicref href="grep.dita"/>
<topicref href="head.dita"/>
<topicref href="history.dita"/>
<topicref href="htop.dita"/>
<topicref href="infopages.dita"/>
<topicref href="iotop.dita"/>
<topicref href="ip.dita"/>
<topicref href="irssi.dita"/>
<topicref href="less.dita"/>
<topicref href="locate.dita"/>
<topicref href="ls.dita"/>
<topicref href="lspci.dita"/>
<topicref href="make.dita"/>
<topicref href="manpages.dita"/>
<topicref href="mkdir.dita"/>
<topicref href="mkfs.dita"/>
<topicref href="molly_guard.dita"/>
<topicref href="more.dita"/>
<topicref href="mv.dita"/>
<topicref href="nano.dita"/>
<topicref href="ncdu.dita"/>
<topicref href="nmap.dita"/>
<topicref href="passwd.dita"/>
<topicref href="rm.dita"/>
<topicref href="rmdir.dita"/>
<topicref href="shell.dita"/>
<topicref href="speccy.dita"/>
<topicref href="symlink.dita"/>
<topicref href="systemctl.dita"/>
<topicref href="tail.dita"/>
<topicref href="tee.dita"/>
<topicref href="telegram_cli.dita"/>
<topicref href="touch.dita"/>
<topicref href="tshark.dita"/>
<topicref href="uname.dita"/>
<topicref href="vi.dita"/>
<topicref href="watch.dita"/>
<topicref href="wget.dita"/>
<topicref href="yum.dita"/>
</topicref>
<topicref navtitle="Artikels">
<topicmeta>
<shortdesc>Enkele handige Artikels</shortdesc>
</topicmeta>
<topicref href="pakketbeheerders.dita">
<topicmeta>
<shortdesc>Pakketbeheerders maken het gemakkelijker om software te beheren
(installeren, updaten, verwijderen, ...)</shortdesc>
</topicmeta>
<topicref href="apt.dita"/>
<topicrefa href="dnf.dita"/>
<topicref href="yum.dita"/>
</topicref>
<topicref navtitle="SSH Beveiligen met Sleutel of YubiKey 4">
<topicmeta>
<shortdesc>SSH Verbindingen beter beveiligen met Sleutel of Hardware Key</shortdesc>
</topicmeta>
<topicref href="ssh_beveiligen_met_sleutel_en_password.dita"/>
<topicref
href="ssh_beveliging_verhogen_dmv_een_openpgp_smartcard_of_yubikey__versie_4_of_hoger.dita"
navtitle="SSH Beveiliging Verhogen d.m.v. Een Smartcard of YubiKey">
<topicmeta>
<shortdesc>SSH Beveliging verhogen dmv een OpenPGP SmartCard of YubiKey (versie
4 of hoger)</shortdesc>
</topicmeta>
</topicref>
</topicref>
<topicref href="terminal_emulators.dita"/>
<topicref href="tshark.dita">
<topicref href="capinfos.dita"/>
</topicref>
<topicref navtitle="Yubikey voor LUKS encryptie en PAM Login">
<topicmeta>
<shortdesc>Yubikey voor LUKS encryptie en PAM Login</shortdesc>
</topicmeta>
<topicref href="luks_intro.dita" navtitle="Introductie">
<topicmeta>
<navtitle>Introductie</navtitle>
</topicmeta>
</topicref>
<topicref href="yubikey_en_pam_login.dita"/>
<topicref href="luks_decryptie_met_yubikey.dita"/>
</topicref>
</topicref>
</map>
Patrick
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: Expand tree when clicking on topic reference

Post by Costin »

Hi patrick,

Thank you for sharing the project with us!

At a quick look at your DITA Map, I can tell this is normal behavior.
As you can also notice from your DITA Map, it's obvious that the "De CLI Tools" topicref does not have any content. There's only a navtitle and a shortdescription. Therefore, as it only serves as an organizing navigation title in the TOC, it is normal to jump to the first topic with content.

For example, in the DITA Map you also have a <topicref href="tshark.dita"> TSHARK topic, which is not an empty topic and has in turn a child topic (<topicref href="capinfos.dita"/>). In that case, you can see that, when clicking the TSHARK navtitle, the tree expands and the TSHARK topic content is presented, not CAPINFOS topic content.

I hope this clears any uncertainties.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
patrick-kox
Posts: 13
Joined: Sat Jun 23, 2018 4:57 pm

Re: Expand tree when clicking on topic reference

Post by patrick-kox »

Thanks Costin,

I made some modifications and it works better now.

Patrick
Post Reply