Slide problems on the mobile

the error and that does not find the slide, but in the desktop version can find it, the site is this: https://www.granshoppingmongolfiera.it/

this is the code mobile:

<div id="slideshow">


  <?php foreach ($page->children()->find('slide')->slides()->toStructure() as $sfondo):?>
<img src="<?php echo $page->children()->find('slide')->url().'/'.$sfondo;?>" alt="slide molfetta" title="HTML.it"/>

<?php endforeach ;?>
</div>

this is desktop code:

<ul class="slideshowBlueBox">
        <?php foreach ($page->children()->find('slide')->slides()->toStructure() as $sfondo):?>
            <li style="list-style: none;">

<span>Image <?php echo  $conteggio = 1;?>
</span>

</li>

            <?php $conteggio++; endforeach;?>
        </ul>

now I noticed that I added the , without my entering it. Example: granshoppingmongolfiera.it/home/slidegsm_website-balck19.jpg </br>

Hey @Rossella_Mascia It helps to help you if you wrap your code snippets with three backticks on a separate line before and after the code block. Thank you.

If you klick on the edit icon, you can see how it should look like.

does not work

Not in your code, when posting code in this forum. Otherwise it is quite unreadable.

This line doesn’t make sense because $sfondo is a structure item with two fields, the image and the URL. So you would have to call

$sfondo->image() //or whatever your field is called.

You code should probably look something like this:

<?php foreach ($page->children()->find('slide')->slides()->toStructure() as $sfondo):?>
<?php if($image = $sfondo->slide_image()->toFile()): ?>
<img src="<?php echo $image->url() ?>" alt="slide molfetta" title="HTML.it"/>
<?php endif ?>
<?php endforeach ;?>

gives me this error

Sorry, missing parenthesis in if-statement (one of my favourites when typing here), corrected above.

please can you rewrite the code in the next answer?

What do you mean, I already corrected the above code snippet.

solved thanks a lot

I have another problem
Uncaught Error: Bootstrap’s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0 index.js:34
at index.js:34
at index.js:21
at bootstrap.js:9
at bootstrap.js:10

Well, that means what it says but is not a Kirby related problem. You have to check and update your jQuery version. Yours is 1.7

Edit: Oh, you are even loading multiple jQuery versions…

Honestly (if I may say so), that code requires a solid clean up, with all that stuff loaded just anywhere, style tags in the body instead of in the head where they belong, all these inline styles etc.

okey thanks