The droplet return the link or path of the number page.
global $database, $wb;
$query=$database->query("SELECT link FROM ".TABLE_PREFIX."pages where page_id=".$id);
$link=$query->fetchRow();
return "http://".$_SERVER['HTTP_HOST']."/pages".$link[0].".php";
Hi
I don't think it is a droplet, because in that case it has to be written like [[wblinkxxx]]. :-D
rgds
erpe
modify [wblinkXX] in [[wblinkXX]] is no problem.
but a way to make a droplet to use this command?
No :-D
Learn more about Droplets at this page:
http://www.websitebakers.com/pages/droplets/about-droplets.php
and
http://www.websitebakers.com/pages/droplets/help.php
rgds
erpe
Sorry for the time for the post XD
It's possible to make a dropelt that permect the parameter that is the number of the page that return the link?
Try this code:
$pid = $title "";
return '<a href="[wblink'.$pid.']">'.$title.'</a>';
then you call a droplet for example [[wblink?pid=1&title=link name]]
cheers
global $database, $wb;
$query=$database->query("SELECT link FROM ".TABLE_PREFIX."pages where page_id=".$id);
$link=$query->fetchRow();
return "http://".$_SERVER['HTTP_HOST']."/pages".$link[0].".php";
I have mad the Droplet that make it the link.
I have sent it at Amasp.
I guess i've to script the wblink droplet myself? In the new WebsiteBaker version it's not available and nowhere to find in droplet libraries... Has anyone got the right code?
Since WB 2.8.1 Rev.1292 from 2010-02-19 this Droplet is never needed.
It's enough to place [wblink123] somewhere in in the template.
WB will replace it with a valid internal link.
Quote from: Mte90 on September 08, 2009, 12:19:40 PM
global $database, $wb;
$query=$database->query("SELECT link FROM ".TABLE_PREFIX."pages where page_id=".$id);
$link=$query->fetchRow();
return "http://".$_SERVER['HTTP_HOST']."/pages".$link[0].".php";
I have mad the Droplet that make it the link.
I have sent it at Amasp.
is there a way to expand this to display the path of a news-post?
Quote from: DarkViper on May 25, 2010, 12:01:20 PM
Since WB 2.8.1 Rev.1292 from 2010-02-19 this Droplet is never needed.
It's enough to place [wblink123] somewhere in in the template.
WB will replace it with a valid internal link.
True, but wblink doesn't work in Bakery full descriptions or in show_menu2
Quote from: Paul - Westhouse ITTrue, but wblink doesn't work in Bakery full descriptions or in show_menu2
That's correct. Some modules/snippets have a little bit too aggressive kind using htmlentities().
So you will see
[wblink123] but the real code behind is
[wblink123] which can not be evaluated by the output filter to prevent i.e. a wanted, literal
[wblink123] in a FAQ section or somewhere else.