summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-04-17 11:29:43 +0100
committerlsces <lester@lsces.co.uk>2026-04-17 11:29:43 +0100
commit1778d95793e4bc5d494ece84ec177b5629c830f3 (patch)
tree0a2bb99a68d29cefd9b3893a0f2baa26f3a9130a
parent5be3819d87efc26863bffe0962a805a267a51700 (diff)
downloadwiki-1778d95793e4bc5d494ece84ec177b5629c830f3.tar.gz
wiki-1778d95793e4bc5d494ece84ec177b5629c830f3.tar.bz2
wiki-1778d95793e4bc5d494ece84ec177b5629c830f3.zip
Tweaks to allow backlinks listing to work. Using to check the backlinks option on the wiki pages, but extending to blogs may be useful.V5-php84
-rwxr-xr-xbacklinks.php1
-rwxr-xr-xtemplates/backlinks.tpl6
2 files changed, 4 insertions, 3 deletions
diff --git a/backlinks.php b/backlinks.php
index e4c3578..864c75f 100755
--- a/backlinks.php
+++ b/backlinks.php
@@ -31,6 +31,7 @@ if( !$gContent->pageExists( $gContent->mPageName )) {
} else {
$_REQUEST["page"] = $gContent->mPageName;
$gBitSmarty->assign('page', $_REQUEST["page"]);
+ $gBitSmarty->assign('page_id', $_REQUEST["page_id"]);
}
// Get the backlinks for the page "page"
diff --git a/templates/backlinks.tpl b/templates/backlinks.tpl
index b9b7461..14a2225 100755
--- a/templates/backlinks.tpl
+++ b/templates/backlinks.tpl
@@ -1,13 +1,13 @@
{strip}
<div class="listing wiki">
<div class="header">
- <h1>{tr}Backlinks to{/tr} <a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}" class="wiki">{$page}</a></h1>
+ <h1>{tr}Backlinks to{/tr} <a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$page_id}" class="wiki">{$page}</a></h1>
</div>
<div class="body">
<ul>
- {foreach from=$backlinks key=page_id item=title}
- <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$page_id}" class="wiki">{$title}</a></li>
+ {foreach from=$backlinks key=content_id item=title}
+ <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?content_id={$content_id}" class="wiki">{$title.title}</a></li>
{foreachelse}
<div class="norecords">{tr}No backlinks to this page{/tr}</div>
{/foreach}