UIKit Slideshow - Blank

  • I try to change my slideshow plugin to do UIKit Slideshows. To do this quick and dirty, I have added the following to the header of the pages:

    Code
    1. <link rel="stylesheet" href="/app/assets/uikit/css/components/slideshow.min.css">
    2. <script src="/app/assets/uikit/js/components/slideshow.min.js"></script>
    3. <script src="/app/assets/uikit/js/components/slideshow-fx.min.js"></script>

    In the body I then add

    Code
    1. <ul class="uk-slideshow" data-uk-slideshow="{autoplay:true}">
    2. <li><img src="storage/Images/Road_Days/thumbs-large/Road Days 2018 04 15 - 3840.jpg" width="800" height="400" alt=""></li>
    3. <li><img src="storage/Images/Road_Days/thumbs-large/Road Days 2018 04 15 - 3841.jpg" width="800" height="400" alt=""></li>
    4. </ul>

    But all I get is a 800x400 empty space... What am I doing wrong?

  • You use the slideshow for a template based on UIKit v2? If yes you have to enable it in the template.php in view folder in the root of the template.

    Hmm, thanks. I am using the Minimal template and will need to find it. But why can't I just include the respective uptick components in Site --> Settings --> Code?

  • Hmm, thanks. I am using the Minimal template and will need to find it. But why can't I just include the respective uptick components in Site --> Settings --> Code?

    you can activate any uikit 2 components this way in the template for theme one for example you go to and edit the:


    /packages/pagekit/theme-one/views/template.php


    In each template you have same structure of folders and files at least on the important things so for minimal should work same. Well you look then for following row containing this:

    PHP
    1. <?php $view->script('theme', 'theme:js/theme.js', ['uikit-sticky', 'uikit-lightbox', 'uikit-parallax', 'uikit-accordion']) ?>


    and change it to this:


    PHP
    1. <?php $view->script('theme', 'theme:js/theme.js', ['uikit-sticky', 'uikit-lightbox', 'uikit-parallax', 'uikit-accordion', 'uikit-slideshow']) ?>

    This should enable the required scripts then, by the way advanced effects i have never got working this way, but as an asset with Romans Assets Extension it worked fine so far.


    However UIKit v2 is fine, but version 3 is a beauty in compare to this as it is easier to get working, works the way you try to do it actualy with uikit v2 and needs way less code for any widgetkit like component. as I like this combination thing very much in version 3. You can make a slideshow with cards components as i did in the uikitify theme or some more things.


    I hope really that we can get some people on board who like to code and can code as forking this thing, as it is making really sad to see such a potent system as pagekit is sinking like titanic over last 2 years. Shame on yootheme that they don't care much about pagekit. :(

  • Thanks, all. It was the lack of inclusion as @Fosphatic Duke had pointed out. What really puzzles me that I basically have to a theme in order to be able to make my extension running. I would rather have called

    PHP
    1. <?php $view->script('theme', 'theme:js/theme.js', ['uikit-sticky', 'uikit-lightbox', 'uikit-parallax', 'uikit-accordion', 'uikit-slideshow']) ?>

    from my extension but I for that I would need to get access to $view, which I could not figure out how to do it...

  • Thanks, all. It was the lack of inclusion as @Fosphatic Duke had pointed out. What really puzzles me that I basically have to a theme in order to be able to make my extension running. I would rather have called

    PHP
    1. <?php $view->script('theme', 'theme:js/theme.js', ['uikit-sticky', 'uikit-lightbox', 'uikit-parallax', 'uikit-accordion', 'uikit-slideshow']) ?>

    from my extension but I for that I would need to get access to $view, which I could not figure out how to do it...

    Well probably this way:


    Problems to load widgets views


    I have to test it out today if i can get it running somehow as i had similar problem during extending the dpnblog extension. It is because the files from views folder in the template are overriding the extension view files.

  • Basically every uikit 2 component is already registered in the system/view module (and some more scripts):


    The LORD is my strength and my shield; in him my heart trusts, and I am helped; my heart exults, and with my song I give thanks to him. Psalm 28,7

  • Basically every uikit 2 component is already registered in the system/view module (and some more scripts):


    But Ii still need to "activate" them, right?

  • Yeah, just do it like that in your template file:


    PHP
    1. $view->script('my-script','path/to/myscript.js',['uikit-*', ...])

    The LORD is my strength and my shield; in him my heart trusts, and I am helped; my heart exults, and with my song I give thanks to him. Psalm 28,7