WebSite X5Help Center

 
Barry T.
Barry T.
User

Php gallery question  en

Author: Barry T.
Visited 1238, Followers 1, Shared 0  

I would like to define a gallery once and include the gallery on each webpage, rather than having an actual gallery on each page.

I've managed to include a text object on each page but no luck so far trying to include a gallery.

The code to include the text page : <?php include 'PageNotice.html'; ?> within a widget/html object and this works on each page, however, this page was created outside of WSX5 (in an  HTML editor)

To include a gallery I would have thought something like <?php include 'Gallery.html'; ?> would work.

Gallery.html is a hidden page with just a gallery object on it 

Ive tried setting the Gallery to a php extension but that hasn't worked either, and defining the page with no template.

Am I wasting my time with this ... or is it possible?

Posted on the
1 ANSWERS
Incomedia
Claudio D.
Incomedia

Hello Barry,

When you make a page in WebSite X5 also without template it will have the standard HEAD section with the tags and when you include the page in another page this will put duplicate tags which will not work correctly. What you could try is to create the gallery with WebSite X5 and then duplicate this page once exported you remove from the duplicated page the extra code to make it render correctly and to avoid that with a new update this page will be overwritte.

ex. gallery.html is the main gallery and you duplicate it to gallery2.html and in the pages where you want to have it visible you add <?php include 'gallery2.html'; ?>

The pages where you add the include code has to be changed to php but it's not necessary to have the gappery page in php.

Hope this helps.

Read more
Posted on the from Claudio D.