Skip to main content
Known Participant
March 31, 2015
Question

Is it possible to include author in topic level output

  • March 31, 2015
  • 1 reply
  • 481 views

Apologies if this is a duplicate post. The submittal GUI choked when I clicked Post.

I have a particular use case for which I'd like the webhelp output to include the <meta name="rh-authors" content="writername"> that's in each of our topics. Not in a generally visible manner, just as part of the meta content in the topic HTML.  I dug around in xmls, js, and DLLs but could not find an obvious file to try hacking. Has anyone ever found a way to accomplish this?

D

This topic has been closed for replies.

1 reply

Captiv8r
Legend
March 31, 2015

Hi there

Unfortunately there isn't any way I'm aware of that you can accomplish this via meta tags.

What you might consider is hiding this information inside a DHTML drop-down somewhere on the page. I used to include a table that listed modifications made to the page, who made them and the date they were made. None of this was visible unless the user clicked a specific image on the page.

Cheers... Rick

Known Participant
April 1, 2015

Thanks Rick.

I will take a look at whether there is an automated way to excerpt the meta tag and add it into a clickable box...we have more than 2400 topics so i do not want to do it manually

Thanks again!

D

Willam van Weelden
Inspiring
April 2, 2015

You can do this with a little JavaScript. For an example, see http://stackoverflow.com/questions/7524585/how-do-i-get-the-information-from-a-meta-tag-with-javascript

For example by adding the following to the footer of your page (Didn't test the script, just made it based on the script provided in the link above):

<p>

<script type="text/javascript">

writeAuthor();

function writeAuthor() {

  var metas = document.getElementsByTagName('meta');

  for (i=0; i<metas.length; i++) {

  if (metas.getAttribute("property") == "rh-authors") {

  document.write(metas.getAttribute("content"));

  }

  }

}

</script>

</p>