Custom template and update
-
Hello,
I would like to know
If I create a custom template from default.view.php : Will it be removed with the next nextgen update ?
Thank you
-
Hi @sosuire,
Your custom templates should be stored within wp-content\ngg\modules – a directory that NGG updates doesn’t rewrite so your custom templates are update safe.
Thank for reply !
I try this but I don’t see my custom template.
I upload on this (file : perso3-view.php) :
ngg/modules/photocrati-nextgen_basic_templates/templates/perso3-view.php
I also try on :
ngg/modules/photocrati-nextgen_basic_templates/templates/thumbnails/perso3-view.phpBut I only see the file I added on nextgen plugin files :
wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/perso2-view.php
(show my screenshot : https://i.ibb.co/2hF6CNX/Capture-d-cran-2023-01-09-150329.png)
Where exactly I have to add it for see on the select view list ?
Thank you-
This reply was modified 3 years, 5 months ago by
Sosuire.
Hi @sosuire,
Please try to move your custom template to /ngg/modules/photocrati-nextgen_basic_gallery/templates then check again to see if that’ll appear under “Select View”.
That was my first try but it don’t work. Is it something else to add ?
NextGen Gallery uses some sort of caching for the display type so lets try to force cleaning it first by adding ?1 ( https://example.com/?1 ) at the end of your page’s URL then try again to see if the view shows up.
I have personally added such a view /wp-content/ngg/modules/photocrati-nextgen_basic_gallery/templates/mihai-view.php 10 minutes ago and it showed up while I’ve tried selecting the view for “Basic Thumbnails” gallery display type.
I have add my template yesterday and it not appear on the select list. So how could I select it ?
I try on shortcode to link to custom/perso-view.php :
[ngg src=”galleries” ids=”2″ display=”basic_thumbnail” display_view=”custom/perso-view.php”]or
[ngg src=”galleries” ids=”2″ display=”basic_thumbnail” display_view=”perso-view.php”]
always the default-view.php is display, not my custom template :/
Thank you
Hi @sosuire
You’ve initially specified that you’ve added the custom template to a different directory other than the one we’ve suggested:
Wrong path: ngg/modules/photocrati-nextgen_basic_templates/templates/perso3-view.php
Correct path: ngg/modules/photocrati-nextgen_basic_gallery/templates/perso3-view.php
Yes it’s a copy/past error (?). I was hoping this was the solution !!
I do it on Correct path since yesterday :ngg/modules/photocrati-nextgen_basic_gallery/templates/perso3-view.php
I try everywhere !! ^^
ngg/modules/photocrati-nextgen_basic_gallery/templates/perso3-view.php
ngg/modules/photocrati-nextgen_basic_gallery/perso3-view.php
ngg/modules/photocrati-nextgen_basic_gallery/templates/thumbnails/perso3-view.php
It never appear !
Hi @sosuire,
Hmm, that’s odd. Perhaps NextGen encounters an issue while trying to load the custom view. Could you please enable WP Debug to see if that’ll catch any open_basedir() related warnings/errors?
-
This reply was modified 3 years, 5 months ago by
The topic ‘Custom template and update’ is closed to new replies.