Tagged: dynamic content
-
AuthorPosts
-
October 15, 2021 at 2:05 pm #1325119
Hello Support
i want to change the content from a layout modul depending a choise from a submenu so i havent to load a complete new side when i change only a part. Is that possible? In the private content you will find the side with a graphic who shows that i just want to change the red content, and which content should be choosen from this submenu, (Maybe there is a better solution, but it´s the best solution i could find.
Thank you
AndreasOctober 17, 2021 at 3:48 pm #1325310Hey alliansohog,
Thank you for your patience and for the link to your site, but without logging in I can not see the content of your link, as it is a “preview” of a draft.
From your description, it sounds like you want to change a text block on your page with the sub-menu items, this may be possible by hiding the content on the page and making it visible by clicking on the menu items.
Is this what you ment?
Please include an admin login in the Private Content area and a test page for us to see your example.Best regards,
MikeOctober 18, 2021 at 12:21 pm #1325403Hello Mike!
From your description, it sounds like you want to change a text block on your page with the sub-menu items, this may be possible by hiding the content on the page and making it visible by clicking on the menu items.
Is this what you ment?
almost… if it works to enable/disable Layoutmodul or Color section regarding the choice from the (sub)menu would be perfect.- This reply was modified 3 years, 1 month ago by alliansohog.
October 18, 2021 at 2:25 pm #1325419Hi,
Thank you for the link to your site, I believe that I understand but I was not sure if I could edit your page so I copied it to my testing site to create this example, please see the working example link below. Above you said you wanted to hide & show the color sections and their content so I started by duplicating your main color section and adding special headings One & Two so it would be clear which we are looking at:
each color section has a custom ID “one” or “two” and the full-width sub-menu has a simple menu built in the sub-menu with two buttons and manual links with only a hastag:
then to hide or show the color sections I added this script inside a code block element and the bottom of the page:
<script> (function($) { $('#one').show(); $('#two').hide(); $('#av-custom-submenu-1 .menu-item-top-level-1').on('click', function(e) { e.preventDefault(); $('#one').show(); $('#two').hide(); }); $('#av-custom-submenu-1 .menu-item-top-level-2').on('click', function(e) { e.preventDefault(); $('#two').show(); $('#one').hide(); }); }(jQuery)); </script>
Please give this a try.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.