Author Topic: MiniGallery not loading  (Read 251 times)

Offline tobyw7

  • Posts: 54
  • Gender: Male
    • Toby White
MiniGallery not loading
« on: May 17, 2020, 06:51:02 PM »
I am wondering how to load MiniGalleryv2 on a page. I have set the page type to the module gallery and even uploaded some pages.
I have set the page here http://shillingtoncong-church.org.uk/pages/gallery.php

Page title is set in the Settings.

Do I need a short code or something in the template file?

I saw some messages with people having problem since update to 2.12.2?

The template file is converted to WB template from a regular template and I am using the following to load in the page "body"

<?php page_content(1); ?>

Offline dbs

  • Betatester
  • **
  • Posts: 8268
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: MiniGallery not loading
« Reply #1 on: May 17, 2020, 07:17:09 PM »
Hi, you have this line in the <head> of your index.php?
Code: [Select]
register_frontend_modfiles('css');

Offline CodeALot

  • Posts: 487
  • Gender: Male
Re: MiniGallery not loading
« Reply #2 on: May 18, 2020, 11:22:30 AM »
(No he did not.)

In fact, copying an existing HTML-file, adding a page_content(1) to it and calling it a WB-template is not enough.
 
What I suggest you do first: compare the structure of a 'real' WB template index.php to that of your HTML file. Copy the essential lines to make it function as a WB-template.
(For instance:
Code: [Select]
<?php 
if (
function_exists('register_frontend_modfiles')) {
        
register_frontend_modfiles("jquery");
register_frontend_modfiles('css');
register_frontend_modfiles('js'); 

    
?>
)
If you have no idea how to do that, feel free to e-mail me your 'template' :)

Offline tobyw7

  • Posts: 54
  • Gender: Male
    • Toby White
Re: MiniGallery not loading
« Reply #3 on: May 18, 2020, 10:01:28 PM »
(No he did not.)

In fact, copying an existing HTML-file, adding a page_content(1) to it and calling it a WB-template is not enough.
 
What I suggest you do first: compare the structure of a 'real' WB template index.php to that of your HTML file. Copy the essential lines to make it function as a WB-template.
(For instance:
Code: [Select]
<?php 
if (
function_exists('register_frontend_modfiles')) {
        
register_frontend_modfiles("jquery");
register_frontend_modfiles('css');
register_frontend_modfiles('js'); 

    
?>
)
If you have no idea how to do that, feel free to e-mail me your 'template' :)

Ah yes, sorry... back when I ported the template this wasn't required but looking back over the old documentation this now makes sense. https://help.WebsiteBaker.org/en/designerguide/enhanced-template-elements.php

I've now added the additional elements and it's now working :)

Thanks both.