-
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"home-link": "Hjemmelink",
|
||||
"plugin-data": {
|
||||
"description": "Navigationsmenu med statiske sider.",
|
||||
"name": "Static Pages"
|
||||
},
|
||||
"show-the-home-link-on-the-sidebar": "Vis hjemmelinket på dit sidepanel."
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Statische Seiten",
|
||||
"description": "Menü der statischen Seiten."
|
||||
},
|
||||
"home-link": "Hauptseite",
|
||||
"show-the-home-link-on-the-sidebar": "Hauptseite im Menü zeigen."
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Statische Seiten",
|
||||
"description": "Menü der statischen Seiten."
|
||||
},
|
||||
"home-link": "Hauptseite",
|
||||
"show-the-home-link-on-the-sidebar": "Hauptseite im Menü zeigen."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Static Pages",
|
||||
"description": "Navigation menu with static pages."
|
||||
},
|
||||
"home-link": "Home link",
|
||||
"show-the-home-link-on-the-sidebar": "Show the home link on the sidebar."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Páginas Estáticas",
|
||||
"description": "Cree su propio menú de navegación con páginas estáticas."
|
||||
},
|
||||
"home-link": "Inicio enlace",
|
||||
"show-the-home-link-on-the-sidebar": "Mostrar el enlace de inicio en la barra lateral."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "صفحات استاتیک",
|
||||
"description": "منوی ناوبری به همراه صفحات استاتیک."
|
||||
},
|
||||
"home-link": "لینک فهرست",
|
||||
"show-the-home-link-on-the-sidebar": "نمایش لینک فهرست در نوار کناری."
|
||||
}
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Pages statiques",
|
||||
"description": "Créez votre propre menu de navigation avec les dernières pages ou pages statiques."
|
||||
},
|
||||
"home-link": "Lien de la page d’accueil",
|
||||
"show-the-home-link-on-the-sidebar": "Afficher un lien vers la page d’accueil dans la barre latérale."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Pagine Statiche",
|
||||
"description": "Crea il tuo menu du navigazione con le pagine statiche."
|
||||
},
|
||||
"home-link": "Collegamento Home",
|
||||
"show-the-home-link-on-the-sidebar": "Visualizza il collegamento della home nella barra laterale."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Static Pages",
|
||||
"description": "Navigation menu with static pages."
|
||||
},
|
||||
"home-link": "ホームリンク",
|
||||
"show-the-home-link-on-the-sidebar": "サイドバーにホームリンクを表示する"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Statische Pagina's",
|
||||
"description": "Toont navigatiemenu met statische pagina's."
|
||||
},
|
||||
"home-link": "Link naar startpagina",
|
||||
"show-the-home-link-on-the-sidebar": "Toon een link naar de startpagina."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Статические страницы",
|
||||
"description": "Меню навигации со статическими страницами."
|
||||
},
|
||||
"home-link": "Домашняя страница",
|
||||
"show-the-home-link-on-the-sidebar": "Отображать ссылку на домашнюю страницу на боковой панели сайта."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Sabit sayfalar",
|
||||
"description": "Sabit sayfalarla gezinti menüsü."
|
||||
},
|
||||
"home-link": "Ana sayfa bağlantısı",
|
||||
"show-the-home-link-on-the-sidebar": "Kenar çubuğundaki ana sayfa bağlantısını göster."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "3.22.0",
|
||||
"releaseDate": "2026-05-10",
|
||||
"license": "MIT",
|
||||
"compatible": "3.22",
|
||||
"notes": ""
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
class pluginStaticPages extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
// Fields and default values for the database of this plugin
|
||||
$this->dbFields = array(
|
||||
'label' => 'Static Pages',
|
||||
'homeLink' => true
|
||||
);
|
||||
}
|
||||
|
||||
// Method called on the settings of the plugin on the admin area
|
||||
public function form()
|
||||
{
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Home link') . '</label>';
|
||||
$html .= '<select name="homeLink">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('homeLink') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('homeLink') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">' . $L->get('show-the-home-link-on-the-sidebar') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
// Method called on the sidebar of the website
|
||||
public function siteSidebar()
|
||||
{
|
||||
global $L;
|
||||
global $url;
|
||||
global $site;
|
||||
global $pages;
|
||||
|
||||
// HTML for sidebar
|
||||
$html = '<div class="plugin plugin-static-pages">';
|
||||
|
||||
// Print the label if not empty
|
||||
$label = $this->getValue('label');
|
||||
if (!empty($label)) {
|
||||
$html .= '<h2 class="plugin-label">' . $label . '</h2>';
|
||||
}
|
||||
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<ul>';
|
||||
|
||||
// Show Home page link
|
||||
if ($this->getValue('homeLink')) {
|
||||
$html .= '<li>';
|
||||
$html .= '<a href="' . $site->url() . '">' . $L->get('Home page') . '</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
|
||||
// Show static pages
|
||||
$staticPages = buildStaticPages();
|
||||
foreach ($staticPages as $page) {
|
||||
if ($page->isParent()) {
|
||||
$html .= '<li class="parent">';
|
||||
} else {
|
||||
$html .= '<li class="subpage" style="margin-left: 10px">';
|
||||
}
|
||||
$html .= '<a href="' . $page->permalink() . '">' . $page->title() . '</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user