The simpler media website CMS
I am using the Basic theme, and have installed the zenpage plug-in. When I try to view a created page in the admin panel, I see this error:
Zenphoto Error: the requested object was not found.
If zenpage is not practical to use with the basic theme, I don't want to waste anyone's time. However, if there is a series of known steps that will add zenpage functionality to the Basic theme, I would like to know them.
Comments
The basic theme is not setup for Zenpage, it's just "basic" ;-) The theme entry of each on our site generally lists plugin support (as far as known for third party ones): https://www.zenphoto.org/theme/basic/image_light.png.html
Since the theme is already old and bascially already deprecated we don't really plan to add it actually (same for responsiveness)
But any theme can be setup for Zenpage. Basic support is quite simple as it is just two additional theme page. The theming tutorial has a part for it:
https://www.zenphoto.org/news/theming-tutorial/#--part-4-theming-zenpage
I really recommend to read the full tutorial to understand theming in general first before starting adding Zenpage support.
Btw, actually the Zenpage theme was originally based in large parts on Basic.
Thanks again, acrylian. I hope I have correctly taken your hints:
Read the tutorial on creating a theme.
Created the files news.php and pages.php in the themes/Basic/ folder.
These now appear in the pages control panel.
The next steps are, if I read the suggested tutorial correctly:
Insert the PHP code (shown below) into index.php.
Create one or more articles in news.php.
Put the first news article from news.php into index.php.
I would guess that I need to make a container, perhaps a div, to display a news article in index.php. Or does one of the functions create such a container?
If I need to make a container, is there a preferred name and/or class for that div, or can I name it anything and style to suit in the CSS?
Php code to add to index.php to display news articles:
<?php if (!extensionEnabled('zenpage') || ($_zp_gallery_page == 'gallery.php' || ($_zp_gallery_page == 'index.php' && !getOption("zenpage_zp_index_news")))) { // The standard next_album and next_image loops here } else { // the standard next_news loop from Zenpage here } ?>Is there a preferred location within index.php to put this code? My understanding is that php gets executed wherever it is on a page. But the water is getting deep, so any suggestion is welcome.
What css or container you use and where you place the code is up to what you like to do. You most likely have to extend the existing CSS to suite your needs.
Regarding 4-6. You don't "put anything anywhere". Once you enabled the Zenpage plugin and created a new article, it will appear if everything is setup correctly with the news loop. That must not be inserte into the theme's index.php
I suggest to look at the Zenpage theme as a guide. Or just do something completely different if you have other purposes. Themes leave a lot freedom what to do how exactly besides the basic structure.
I have turned on the zenpage extension. My aim is twofold: 1) put an introductory article on the home page (index.php I believe) above or to the right of the row(s) of galleries, and 2) add a contact form, preferably on its own page.
The PHP code above for insertion into index.php came from the instruction page you directed me to:
https://www.zenphoto.org/news/theming-tutorial/#--part-4-theming-zenpage
News on index.php Top
This option allows to turn the theme index.php into the first page of the news section (all further ones will be displayed on news.php). All you have to do to use this is to copy the complete next_news() loop to your index.php.
So bascially you have to modify the theme's index.php like this:
<?php if (!extensionEnabled('zenpage') || ($_zp_gallery_page == 'gallery.php' || ($_zp_gallery_page == 'index.php' && !getOption("zenpage_zp_index_news")))) { // The standard next_album and next_image loops here } else { // the standard next_news loop from Zenpage here } ?>You actually can just follow how the Zenpage theme does it.
It's
index.php
is a little more special because it also allows setting a Zenpage page as the home page. Beside taht you can use various template functions in custom ways to call pages or articles directly for display.https://docs.zenphoto.org/package-plugins.zenpage.html
basic theme with zenpage implemented: https://testalbum-2.sbillard.org/