WebsiteBaker Community Forum

WebsiteBaker Support (2.12.x) => Modules => Topic started by: tobyw7 on May 17, 2020, 06:51:02 PM

Title: MiniGallery not loading
Post by: tobyw7 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 (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); ?>
Title: Re: MiniGallery not loading
Post by: dbs 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');
Title: Re: MiniGallery not loading
Post by: CodeALot 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' :)
Title: Re: MiniGallery not loading
Post by: tobyw7 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 (https://help.WebsiteBaker.org/en/designerguide/enhanced-template-elements.php)

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

Thanks both.