When the user clicks this icon, I want them to be taken to the New topic page within the project.
The button sits here:
Project > Skins > ToolBar > Styles > New
May I have a dummies' guide on how to do this please
Many thanks.
Code: Select all
window.location.href="NewTopic.htm";Code: Select all
window.location.href="https://your-site.com/yourhelp/Content/NewTopic.htm";Dave Lee wrote:Use javascript in the toolbar event.
For example, this will try to open a file called NewTopic.htm in the same folder:However, that only works if the file is in the same relative position. But if you keep topics in different folders, then the relative path to NewTopic.htm is not going to be fixed.Code: Select all
window.location.href="NewTopic.htm";
A more robust solution would be to use an absolute link to the topic in its published location; e.g.Code: Select all
window.location.href="https://your-site.com/yourhelp/Content/NewTopic.htm";