Etogal gallery on two documents
#1
Posted 10 October 2008 - 09:34 AM
I have been using EtoGal for a while now and is pleased with it.
Now a have a problem.
I need to have the same gallery shown on two different pages with different templates (two different languages).
The two pages need to be identical.
EtoGal can only be shown on the page with the same id.
EtoGalGallery can show the gallery on different pages, but it shows a fullscreen image on top (and has other stylings).
I want the gallery to look as the normal original EtoGal gallery on both pages.
Is there some other sollution, or do I have to tweek either EtoGal or EtoGalGallery to suit my needs?
If the later is the case, which of the snippets would be easiest to tweek?
Best
#2
Posted 10 October 2008 - 12:29 PM
Etogal only supports a single title and description, so if you want these in different languages too you're going to have to do some extra work (see CrisD's snippets referenced later - one of these allows for addition of extra fields, I think)
Etogal itself was originally designed to operate on a single page for a gallery. I don't know how much work would be involved in converting it to display on another page (in one of the display modes that I never used it would probably be very tricky), and you'd need to be careful that the admin mode was never triggered on the second page, or that might cause other problems. (I only use the admin part of this snippet now)
EtoGalGallery doesn't have to display the top image, it depends on what you do with the styles. You can just set the top image style to be empty, I think. You will then have to decide what to do if someone clicks on one of the thumbnails.
There are other snippets that display images from the etogal tables, and allow additional data to be stored, written by CrisD - they are in the snippets > Images and Galleries section. One of these may be closer to what you want.
#3
Posted 10 October 2008 - 01:36 PM
Thanks for the quick answer.
The galleries on the 2 pages should be exactly the same, they will just use different templates. The description fields only have the name of the photographer, so it doesn't make any sense to have 2 identical galleries for each language.
I think I will take a closer look at EtoGalGalleries, before looking at other solutions.
All the best.
#4
Posted 10 October 2008 - 01:49 PM
The galleries on the 2 pages should be exactly the same, they will just use different templates. The description fields only have the name of the photographer, so it doesn't make any sense to have 2 identical galleries for each language.
From your description it sounds as though there should be no problem in using the exact same snippet call on the two different pages that use different page templates... I did wander off and come back here so I may have missed something...
#5
Posted 10 October 2008 - 02:45 PM
Thinking about it, as you don't want the top image, EtoGalThumbs would probably do just as well for you. (EtoGalGalleries is essentially the same code with some changes to the defaults and with additional code to handle the top image.)The galleries on the 2 pages should be exactly the same, they will just use different templates. The description fields only have the name of the photographer, so it doesn't make any sense to have 2 identical galleries for each language.
I think I will take a closer look at EtoGalGalleries, before looking at other solutions.
#6
Posted 14 October 2008 - 09:02 AM
From your description it sounds as though there should be no problem in using the exact same snippet call on the two different pages that use different page templates... I did wander off and come back here so I may have missed something...
the problem with EtoGal is that it creates a gallery for the specific pageid where the snippet is called from. So if the gallery is on pageid 14 - it will create a folder for the images on the server with the name 14.
I want to show these images on both pageid14 and another pageid, but this is not possible. Simply because you cannot point to a different folder than that of the pageid, the snippet is called from!
Then there are two extensions to the EtoGal snippet, EtoGalThumb - the purpose of this is to show a few thumbs from the EtoGal-gallery on another pageid - and EtoGalGalleries - which enables you to show several galleries on the same page.
At first sight, it seems that EtoGalGalleries come closest to what I want, but it has a different way of showing the full sized images, that I don't like.
I also think it should be quite easy to change the EtoGal snippet-code, so you can point to a folder other than that of the pageid, as this is all that I want - at least EtoGalThumbs and EtoGalGalleries shows that it is possible....
I hope this clarifies a bit.
All the best
#7
Posted 14 October 2008 - 09:46 AM
$pageinfo=$etomite->getPageInfo($etomite->documentIdentifier,1, "id, pagetitle, longtitle, description, alias, createdby");
If you add code to collect a specific page id, you will be able to display a separate instance on a separate page for a set gallery by:
1) Add a snippet called code to collect the specific page id variable by adding something like:
$pageToShow=$pageToShow? $pageToShow: $etomite->documentIdentifier;
2) replace $etomite->documentIdentifier with $pageToShow
3) make sure that the manager is not accessible so that you don't accidentally upload files to an incorrrect folder by: changing $access_permitted to 0 for that snippet call in the same manner as above.
4) Then if you call [!etogal?pageToShow=15&access_permited=0!]
You *should* be in business (not tested).
Cheers,
Cris D.
#8
Posted 29 April 2009 - 03:43 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











