I'm trying to add data-uk-sticky attribute to a Joomla module that displays a sidebar menu (to make it sticky).

For that, I created an alternative layout by copying




In the sticky.php file I wrapped the whole content in a div like:

<div data-uk-sticky><ul class="nav menu<?php echo $class_sfx;?>"<?php

In the module admin, I can now select Sticky in the Alternative Layout configuration.

However, when reloading the page I can't find the div I created. Why not?

I also tried copying the whole mod_menu to the template/html folder but the result is the same.

  • You say you've wrapped everything in a div, but are you sure you closed it with </div>? – Lodder Dec 27 '15 at 19:38
  • Hello @Lodder, yes, I'm sure about that, I just didn't show the code. – Nuno Nogueira Dec 27 '15 at 19:48
  • Arn't you going to assign something to the data-* attribute, e.g., data-uk-sticky="blah"? Do you intent to make it a property? From your statements, you don't. – Ejaz Dec 27 '15 at 20:32
  • No, I'm leaving it empty as per getuikit.com/docs/sticky.html – Nuno Nogueira Dec 28 '15 at 21:24
  • This page has been abandoned. If you have resolved the issue, please consider posting a complete and educational answer. If you would still like support and have more details to share, please update your question. If you are no longer seeking support and have no intention of progressing this page toward a system recognized resolution, you are welcome to delete your question. Abandoned pages represent information dead ends for researchers. – mickmackusa Oct 20 '18 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.