The layout of the menu # tabs similar to that in Wordpress

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
sylwekb
Joomla! Explorer
Joomla! Explorer
Posts: 384
Joined: Mon Mar 14, 2011 5:08 pm

The layout of the menu # tabs similar to that in Wordpress

Post by sylwekb » Thu Jan 27, 2022 12:30 pm

I am using the Cassiopeia template. Is it possible to get a smooth tab effect similar to Wordpress? It's about scrolling within one page. As I understand it, these are # (bookmarks)? Is there an addition to this or can this be done with existing joomla functionality?

e.g. Wordpress

Code: Select all

https://gdg.pl

sylwekb
Joomla! Explorer
Joomla! Explorer
Posts: 384
Joined: Mon Mar 14, 2011 5:08 pm

Re: The layout of the menu # tabs similar to that in Wordpress

Post by sylwekb » Fri Jan 28, 2022 9:08 am

I mean a scrolling menu in the style of a smooth scroll. I can see that Astroid Framework has this functionality. Has anyone managed to achieve such an effect on the Cassiopeia template?

https://www.templaza.com/blog/how-to-co ... lyany.html

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24985
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: The layout of the menu # tabs similar to that in Wordpress

Post by pe7er » Fri Jan 28, 2022 9:13 am

Yes, a one-page-layout with that smooth scroll effect can be done with Joomla out-of-the-box.

Create menu items of type "External URL" to links that start with #, like #bookmark. In your articles that you display on the page (e.g. via Category Blog), add some IDs to your article (or via template override to the title)

Code: Select all

<h2 id="bookmark">The title of the article</h2>
General info about such anchor links: https://www.w3docs.com/snippets/html/ho ... -page.html

To create the smooth scroll, you have to add some custom CSS to your template (in user.css) that does the scrolling effect. Maybe you only need:

Code: Select all

html {
 scroll-behavior: smooth;
}
source: https://developer.mozilla.org/en-US/doc ... l-behavior
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

sylwekb
Joomla! Explorer
Joomla! Explorer
Posts: 384
Joined: Mon Mar 14, 2011 5:08 pm

Re: The layout of the menu # tabs similar to that in Wordpress

Post by sylwekb » Fri Jan 28, 2022 10:15 am

I do not know if there is anything else need to do because it does not work for me, see one example. The link "test" is not working.
You do not have the required permissions to view the files attached to this post.


Locked

Return to “Templates for Joomla! 4.x”