[SOLVED]MultiMenu plugin and Massively-2.1 theme

Post Reply
lesmegeres
Sr. Bludit
Posts: 30
Joined: Wed Jul 19, 2023 6:51 pm
Location: Paris - France
Has thanked: 3 times
Been thanked: 2 times
Contact:

Hi,

Has anyone in the community been deploying multimenu in a massively-2.1 environnement ? I am a bit puzzled by where I have to insert the function provided to run the menu.

From what I understand, the 'menu' in the theme is a loop on static pages each one being displayed within a <li> inside a <ul>. If I am not wrong it is part of 'home.php' between lines 19 to 33.

Do I have to comment all thoses lines and insert this simple line

Code: Select all

<?php multiMenu("menu"); ?>
to make it work.

I am trying to find a way out of a problem I have : viewtopic.php?t=2685.

WBR,

Bonjour,

Quelqu'un dans la communauté a-t-il déjà utilisé le plugin multiMenu avec le thème Massively-2.1 ? Je ne sais pas trop où insérer la fonction créée par le plugin...

D'après ce que je comprends le 'menu' du thème est une suite de '<li>' alimenté par une boucle qui va lire les pages statiques. Cela semble se trouver entre les lignes 19 et 33 du fichier 'home.php' du thème.

Pensez-vous qu'il suffirait de commenter ces lignes et d'insérer la fonction générée par le plugin à la place pour que cela fonctionne ?

J'essaye ainsi de trouver une solution à un autre problème que je rencontre avec ce thème : viewtopic.php?t=2685

Bien à vous
Last edited by lesmegeres on Sat Sep 09, 2023 8:42 am, edited 1 time in total.
User avatar
multicolordev
Master Bludit
Posts: 137
Joined: Thu May 26, 2022 12:33 pm
Has thanked: 15 times
Been thanked: 91 times

https://discord.gg/8EaFmdBQHf come ro my discord. I try help;) :D
Image
User avatar
multicolordev
Master Bludit
Posts: 137
Joined: Thu May 26, 2022 12:33 pm
Has thanked: 15 times
Been thanked: 91 times

Ok,
https://plugins.bludit.com/plugin/theme-editor install this.
And on index.php on root theme folder you must replace like this. But remember change name inside multimenu function!

Code: Select all

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
	<meta name="author" content="Bludit CMS">

	<!-- Dynamic title tag -->
	<?php echo Theme::metaTags('title') ?>

	<!-- Dynamic description tag -->
	<?php echo Theme::metaTags('description') ?>

	<!-- Include Favicon -->
	<?php echo Theme::favicon('img/favicon.png') ?>

	<!-- Include CSS Styles from this theme -->
	<?php echo Theme::css('assets/css/main.css') ?>

	<noscript>
	<?php echo Theme::css('assets/css/noscript.css') ?>
	</noscript>

	<!-- Load plugins -->
	<?php Theme::plugins('siteHead') ?>
</head>
<body class="is-preload">

	<!-- Load plugins -->
	<?php Theme::plugins('siteBodyBegin') ?>

	<!-- Wrapper -->
	<div id="wrapper" class="fade-in">

		<!-- Intro -->
		<div id="intro">
			<h1><?php echo $site->title() ?></h1>
			<p><?php echo $site->description() ?></p>
			<ul class="actions">
				<li><a href="#header" class="button icon solo fa-arrow-down scrolly">Continue</a></li>
			</ul>
		</div>

		<!-- Header -->
		<header id="header">
			<a href="<?php echo Theme::siteUrl() ?>" class="logo"><?php echo $site->title() ?></a>
		</header>

		<!-- Nav -->
		<nav id="nav">

		 
			<ul class="links">
				<?php getMultiMenu('yourmenuname');?>
			</ul>
			 
			<ul class="icons">
				<!-- Social networks defined in init.php -->
				<?php foreach (Theme::socialNetworks() as $key=>$label): ?>
					<?php if ($site->{$key}()): ?>
					<li><a href="<?php echo $site->{$key}() ?>" class="icon <?php echo 'fa-'.$key ?>"><span class="label"><?php echo $label ?></span></a></li>
					<?php endif; ?>
				<?php endforeach; ?>
			</ul>
		</nav>

		<!-- Main -->
		<div id="main">
		<?php
			if ($WHERE_AM_I == 'page') {
				include(THEME_DIR.'page.php');
			} else {
				include(THEME_DIR.'home.php');
			}
		?>
		</div>

		<!-- Copyright -->
		<div id="copyright">
			<ul><li><?php echo $site->footer() ?></li><li>Powered by <a href="https://www.bludit.com">Bludit</a></li></ul>
		</div>

	</div>

	<!-- Scripts -->
	<?php echo Theme::jquery() ?>
	<?php echo Theme::js('assets/js/jquery.scrollex.min.js') ?>
	<?php echo Theme::js('assets/js/jquery.scrolly.min.js') ?>
	<?php echo Theme::js('assets/js/browser.min.js') ?>
	<?php echo Theme::js('assets/js/breakpoints.min.js') ?>
	<?php echo Theme::js('assets/js/util.js') ?>
	<?php echo Theme::js('assets/js/main.js') ?>

	<!-- Load plugins -->
	<?php Theme::plugins('siteBodyEnd') ?>

</body>
</html>
Image
lesmegeres
Sr. Bludit
Posts: 30
Joined: Wed Jul 19, 2023 6:51 pm
Location: Paris - France
Has thanked: 3 times
Been thanked: 2 times
Contact:

Hi,

I'm impressed. I will install and run on my local server and let you know. Anyway I thank you so much for the moment.

I am out part of the day but I will let you know asap.

Have a nice day,

WBR,

Q
lesmegeres
Sr. Bludit
Posts: 30
Joined: Wed Jul 19, 2023 6:51 pm
Location: Paris - France
Has thanked: 3 times
Been thanked: 2 times
Contact:

Hi,

I would like to thank you again as it works just fine.

Maybe a mismatch between name function getMultiMenu() versus multiMenu() ?

Then, I would like to ask you a small amendment to your code.

When clicking on a static page title within you plugin, we are redirected to the root of the blog

Code: Select all

/
.

Could it be possible to be routed, as it is done natively within massively-2.1, to the

Code: Select all

url of the title content
?

It would then just be perfect.

What level of donation do you expect ?

I do not want to be embarrassed of embarrass you by giving to much or too little.

Thanks again

WBR,

Q
Post Reply