Skip to main content
Known Participant
Mar 31, 2015 12:59 PM UTC
Question

Is it possible to include author in topic level output

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 is closed to new replies. Start a new post to keep the conversation going.

5 replies

Captiv8r
Legend
Mar 31, 2015 10:24 PM UTC

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

Translate
Known Participant
Apr 1, 2015 12:55 PM UTC

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

Translate
Willam van Weelden
Inspiring
Apr 2, 2015 8:40 AM UTC

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>

Translate