Search…

X3 Photo Gallery Support Forums

Search…
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Insert Gallery in Content

06 Apr 2023, 11:19

Hi,

I successfully used the method described here to insert Folders in the Content (or rather, moving part of the Content after the Folders): viewtopic.php?f=52&t=9890&p=45172

Now I wanted to apply the same principle to a Gallery. It does work, but only when navigating to the page via the menu. If I access the URL directly (or by refreshing), the Gallery is there, but thumbnails are blank and don't open in the pop-up.

https://test.danielbollinger.de/angebot ... otografie/
Access: test/test

(Gallery inserted near the end of the page between the "10 Steps..." accordeon and the green area with testimonials.)
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Insert Gallery in Content

06 Apr 2023, 23:42

All in all, this is just a very bad idea. X3 galleries need to apply layout (by javascript), which then affects how they appear and load in viewport (lazy load). Moving this around can (and will in this case) affect the order of processes, possibly also related to how the page is loaded. It's likely this worked for folders, probably because you weren't using the "justified" layout.

You can try another layout perhaps. Optionally, you could give me panel access and I can try to tweak some setTimeout(), but this might not work. It's just not made to be manipulated like this.
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Insert Gallery in Content

11 Apr 2023, 06:40

mjau-mjau wrote: All in all, this is just a very bad idea.
This is a little surprise, after all it's the solution you proposed in the other thread. But I (at least superficially) understand the problem – I will give it a shot with a different layout.

Edit: Didn't work with the different layout either. I will think about putting the gallery at the end of the page or have a "fake" gallery like I do here: https://hochzeiten.danielbollinger.de/
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Insert Gallery in Content

12 Apr 2023, 03:40

metallissimus wrote:This is a little surprise, after all it's the solution you proposed in the other thread. But I (at least superficially) understand the problem – I will give it a shot with a different layout.
:relaxed: I believe that post is primarily about moving some "content" (custom html from content section) to below the folders module. Although it's not really a good solution to move elements around on a page via Javascript, in this case it would be rather harmless. Moving core X3 elements around however, like galleries that contain a lot of javascript-events and CSS, could easily break unfortunately, and there isn't much I can do about it.

Maybe these things can be improved.
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Insert Gallery in Content

12 Apr 2023, 04:37

mjau-mjau wrote: I believe that post is primarily about moving some "content" (custom html from content section) to below the folders module.
I only moved some content below the gallery, I didn't move the gallery itself. In fact I still have the same problem now with the gallery at the end of the page. Should I start a new thread for this because it has nothing todo with the original topic?
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Insert Gallery in Content

12 Apr 2023, 05:01

I'm not sure where we are at right now. Earlier, I am pretty sure we were moving a gallery. If you are only moving content below gallery, where are you moving it? Not INTO the gallery. I need to see a link to see and diagnose what is going on.

You can post here.
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Insert Gallery in Content

12 Apr 2023, 06:00

Sorry for the confusion. Earlier I had moved HTML content below the gallery (with a class .after-gallery that I moved via JS). Because the gallery didn't display properly I removed the class and the JS, but the problem remained: The gallery didn't show most of the time.

But I think I found the problem: There were some errors in my HTML (mostly stray tags), fixing those seems to have fixed the issue. Also moving content below the gallery works fine now.

Sorry again, I'm gonna remember that and validate my HTML before posting.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: Insert Gallery in Content

12 Apr 2023, 22:21

:clap: :star: