FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

passing page url outside of FogBugz

We have recently made use of the FogBugz wiki to provide support information to our clients. I have attached some buttons to the wiki template ("Ask a question about this page") which takes the user to a contact page on our site. Is there an easy way to pass the name of the referring page to our website?

Normally I would do this in PHP, but I can't seem to attach any php code that works to the templates. Any one have any clues please?
Brendan Hillary Send private email
Wednesday, December 12, 2007
 
 
Couldn't you add javascript to the template to set some field based on the URL?
Michael H. Pryor Send private email
Wednesday, December 12, 2007
 
 
An example of Michael's suggestion:

Say you want to pass the URL of the referring page to your contact page via a paramater called "source."

When looking at wiki article #123, you want the URL that your users follow to look something like:

www.yoursite.com/contact.php?source=default.asp?W123

...if this is the case, then insert this link into your template:


<a href="javascript:document.location='http://www.yoursite.com/contact.php?source='; + encodeURIComponent('$url$');">Contact Page</a>


...the FogBugz template will replace $url$ with the URL of the current wiki article, and the javascript code will properly encode the URL to be passed as the "source=" parameter to your PHP code.

Let me know if you have any problems.
Ben Kamens Send private email
Wednesday, December 12, 2007
 
 
Thanks Ben - worked like a charm.
Brendan Hillary Send private email
Wednesday, December 19, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.