Link is not working

Hi there!
I want to add a link for printing on my DokuWiki page.
I’m trying this but it doesn’t seam to work;

<?php echo '<a href="'.$url.'?do=export_xhtmlbody">Print</a>' ?>

I want the $url to be the url for the current page and the rest should be added to get the action.
Someone that can fix my mess? :grin:
Mike //

Define, ‘printing’? Do you mean to send to a printer or something different?

It’s a link that runs an action script that creates a printer friendly page. The link to a page is ie http://mypage.com/PKAmanual/doku.php?id=manualen:annonsering. If you then add &do=export_xhtmlbody after that and enter it will create a print friendly page.
Hope that made it a little more understandable? :slight_smile:

Compare your current link with what you just stated above and tell me what you see?

That’s why i asked here because i’m not in to this. I want the end link to look like this:
http://mypage.com/PKAmanual/doku.php?id=manualen:annonsering&do=export_xhtmlbody
But i want it to be something like the php i first wrote so that when i add this code in my template it will fetch the current page link and then add the export thing. I don’t know how to explain this better so otherwise i have to leave it…

I don’t think you are getting what I am saying,
What you first posted:

What you said you need for it to work

So either I am missing something or you are. What differences do you see between number 1 and number 2?

I understand the confusion with ? and &. I apologize for that. :slight_smile:
Ok, we take it from the beginning:
When I go to a page on my Wiki, the link is in a format that is:
http://mypage.com/PKAmanual/doku.php?id=manualen:annonsering
I would like a link on each page that creates a printable page (i want to put this link in my template, witch is in php). You get such a page by adding &do=export_xhtmlbody at the end of the above link (ie http://mypage.com/PKAmanual/doku.php?id=manualen:annonsering&do=export_xhtmlbody).
In order for this link to be created, so that it matches the particular page you have up, I want to get a php code that “creates” the link that fits the page. When I look at another link they use .$Url. to get the link for the current page but when I tried to do the link as follows; <? php echo '<a href="'.$Url.'&do=export_xhtmlbody">Print</a>' ?> then it won’t be right.
Hope it gave a little more clarity to this?

So your issue is that you haven’t defined the url variable and are asking about that?

Nevermind! Leave it…

¯\_(ツ)_/¯
Sponsor our Newsletter | Privacy Policy | Terms of Service