Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1910

Templates for Joomla! 4.x • Re: offcanvas on cassiopeia, no extensions

$
0
0
i want to manually code offcanvas into cassiopeia as I'm refusing to believe there's a collapsible menu option yet the menu is not coded in, i've seen a video that displays how it's done on a non joomla site, no javascript that i'm aware of, only css and that aria target stuff, i've tried modifying mod_menu files, nothing... any suggestions? i don't think an extension is justified for such a small cosmetic thing
Hi. Not so difficult.
It is only required copy/paste skills and attentiveness :)

Copy code example from https://getbootstrap.com/docs/5.0/components/offcanvas/ to your desktop HTML editor (Notepad ++, VS Code and ect)
3.jpg
--

Remove content from code example like shown on screenshot
4.jpg
--

In Cassiopea create menu module override
5.jpg
--

You will get some files. Rename (1) to offcanvas.php. Delete all others (2).
1.jpg
--

Open offcanvas.php to edit.
Add two lines of code:

Code:

use Joomla\CMS\HTML\HTMLHelper;HTMLHelper::_('bootstrap.offcanvas');
2.jpg
--

To be continued... :)

Statistics: Posted by Pavel-ww — Tue Apr 30, 2024 8:42 am



Viewing all articles
Browse latest Browse all 1910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>