@terryfic – The easiest approach to creating custom templates for the NextGEN Basic display types is to use the templates found under wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/ for guidelines.
I would suggest the “captions” template as the best one to work from.
Thanks!
– Cais.
You’re misunderstanding my question. I don’t need the image captions or titles; that part I’ve figured out. It’s the GALLERY name and description I’m asking about. Can’t you simply tell me the code I’d need to pull that data? The correct php tags in the following:
<h3><?php echo $gallery->title?></h3>
<?php echo $gallery->description?>
Thanks.
Terry
@terryfic – I’m not seeing anything specifically wrong with the code you are trying to use, here it is inserted into the “captions” template as an example: https://cloudup.com/c_gvsbFPmKj
Thanks!
– Cais.
Thanks for your help! php isn’t my language (webDNA is) so I can only understand so much. I looked at your example and inserted the code on this page: /modules/nextgen_basic_gallery/templates/thumbnails/index.php and even the variable dump isn’t working. It only returns NULL, which is odd since variables must be used elsewhere on the page and of course render the thumbnails just fine. In the user interface I’m not seeing an option for a “captions” template, although I do see the file in the ngglegacy folder.
Is it possible I need the pay version to get access to all the variables for this kind of customization?
I suspect I need to be querying the db for the gallery record itself but like I say, I’m not a native php speaker so…
Here’s where I’m trying to insert this info, toward the end of the snippet. Seems like the right place to do so. I guessed at variants like <?php echo esc_attr($displayed_gallery_title)?> which didn’t return anything either:
<!– begin NextGenGallery thumbnail template wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/index.php –>
<?php
$this->start_element(‘nextgen_gallery.gallery_container’, ‘container’, $displayed_gallery);
?>
<div
class=”ngg-galleryoverview<?php if (!intval($ajax_pagination)) echo ‘ ngg-ajax-pagination-none’; ?>”
id=”ngg-gallery-<?php echo esc_attr($displayed_gallery_id)?>-<?php echo esc_attr($current_page)?>”>
<h3><?php echo $gallery->title; ?></h3>
<?php echo $gallery->description; ?>
<?php if (!empty($slideshow_link)): ?>
<div class=”slideshowlink”>
‘><?php echo $slideshow_link_text ?>
</div>
<?php endif ?>
==============
Thanks again for your help. And if I’m just a nuisance newbie, let me know and I’ll leave you alone.
@terryfic – As I noted, the best method for Basic templates is to use the NextGEN Legacy style of templates not the current NextGEN Gallery display types.
The two different templates use two different approaches, and using the legacy method is much simpler for what you are describing.
– Cais.
Thank you very much! I checked the NextGEN gallery settings page, and the option for Template was blank. I’m good to go now. Thanks again for your help.
@terryfic – Thanks for the follow-up!
– Cais.