Getting Document Name

Ger Vang asked on August 12, 2014 22:04

Using this page as an example: http://devnet.kentico.com/docs/7_0rc/devguide/index.html?print_page.htm

How do you dynamically change the page title to associate with the page you are on during Print Page? If you scroll all the way down to the last screen shot. I want to be able to change the "Corporate site - Print" to something like "HTC Sensation - Print".

Correct Answer

Ger Vang answered on August 12, 2014 22:16

NVM, I found it. If have an easier way, please let me know.

{%Documents[QueryString["printpath"]].DocumentName|(identity)GlobalAdministrator%}

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on August 13, 2014 00:13

I'd be careful with that simply because of the values that could or couldn't be passed.

0 votesVote for this answer Mark as a Correct answer

Ger Vang answered on August 13, 2014 20:51

Can this be harmful for my site?? What's some examples?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 14, 2014 05:41 (last edited on December 10, 2019 02:30)

I'd use something like this macro which will return the same thing but not have to iterate through all the documents. {%CurrentDocument.DocumentName|(identity)GlobalAdministrator%}

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.