Jump to content

Problem with images


Java
 Share

Recommended Posts

Hello all,


In the past I have made a few websites with Joomla and Seblod. Joomla is completely revamped in the current version 4 and Seblod is hardly updated and not compatible with the new version of Joomla. That is why I started looking for a good CMS.

Processwire seems to me to be an excellent replacement, although I need to learn more about the structure and code of the templates.
At the moment I am working on my wife's site (https://www.jokeruijs.nl/en/). Using the Regular profile I am trying to generate a list of photos with descriptions. I have a page with two fields: "title" and "image". The template has the following code:

<div id="content">
    <?php foreach($page->children() as $child) {
    } ?>
    <?php foreach($child->get('images') as $image) {
    $thumb = $image->width(250);
    } ?>
    <div class='favs'>
        <a href='<?=$image->url?>' data-uk-lightbox="image">
            <img src='<?=$thumb->url?>' alt='<?=$child->title?>'>
        </a>
        <div class='text-favs'>
            <span><?=$child->title?></span>
        </div>
    </div>
</div>

Problem: Only one picture is shown. The titles of the child pages are there. How do I get all the photos in place?

Link to comment
Share on other sites

<div id="content">
    <?php
    // get all children as $child
    foreach($page->children() as $child)
    {
       // get all images and output the single images 
       foreach($child->get('images') as $image)
       {
          $thumb = $image->width(250);
          ?>
          <div class='favs'>
              <a href='<?=$image->url?>' data-uk-lightbox="image">
                  <img src='<?=$thumb->url?>' alt='<?=$child->title?>'>
              </a>
              <div class='text-favs'>
                  <span><?=$child->title?></span>
              </div>
          </div>
    <?php
       }
    }
    ?>
</div>

Something like this 😉 I think you should have another look at the php foreach function how it works 😉 

  • Like 3
Link to comment
Share on other sites

Hi @Java and welcome to the bright side 🙂 

On 1/5/2023 at 5:10 PM, Java said:

In the past I have made a few websites with Joomla and Seblod. Joomla is completely revamped in the current version 4 and Seblod is hardly updated and not compatible with the new version of Joomla. That is why I started looking for a good CMS.

I have the same background and switched in 2014 nd could not be happier with that decision (and couldn't thank @gebeer enough) 🙂 I hope you enjoy it as much as I do 😉 

It's kind of funny that people are still using joomla + seblod. It seems that things have not really changed since 2014... For me that was a terrible time - If I had a question and got stuck somewhere my only hope was the seblod forum. But you never knew when (or if at all) you got an answer. Usually it took two weeks and the answers where not even near as helpful as what I'm used to in the PW forum 🙂 

It also makes me smile when I read this:

adAaheZ.png

I can still remember that I've read that statement back then and I was a little afraid as ProcessWire really looked a little bit too simple for what I was looking for. I was so wrong 🙂 ProcessWire is just really, really good at hiding complexity and making simple things simple but providing the power under the hood to help you build whatever you can think of.

@Java so what is your experience of the seblod community at the moment? Is the project dead? Is there any progress? Are maybe more people there looking for an alternative? Mabe we could help them find ProcessWire 🙂 

PS: Hey google, can you please let people know, that ProcessWire is a great alternative to Joomla + Seblod in 2023?! 😉 

  • Like 1
Link to comment
Share on other sites

When I started Joomla was still called Mambo. At that time it was quite easy to modify the code to get the desired result; the examples were freely available. That changed with time. Joomla became more and more complicated and the extensions more and more commercial. Seblod was a breath of fresh air. With that you could make what you wanted if you were willing to spend a lot of time searching and studying. I only used the forum to search existing posts.
With Joomla 4 it's all done with freedom and joy. Seblod has collapsed and the owners of Joomla-Seblod websites have nowhere to go. At least that's how it seems.
Until I came across Processwire after a lot of searching.
It takes time to understand the structure and to get used to the simplicity, but it is easy to do with the different profiles.
Yes, Seblod is dead and so is Joomla for me.
I've been thinking about posting on the Seblod forum about Processwire. Something stopped me: many users means many hackers.
And yet..... this message also goes to the forum of Seblod.

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...