New landing page

I am using Omeka Classic. It is a private collection for the use of a large genealogical family. Everyone has to register and be approved to access the site. I want to create a public landing page with general information about the collection and an explanation about registering. I am using the Guest User plugin which works beautifully and does just what I want. However, I am having trouble building the new landing page. I am using the Berlin theme. In that directory, I have cleaned out the Index.php file which provides me a canvas to build this new landing page. However there is one critical line in the code, the top line: <?php echo head(array('bodyid'=>'home', 'bodyclass' =>'two-col')); ?>
This line is critical for placing the Login and Register links at the top right, which I want to retain. However, it also codes for items that I don’t want, namely, the collection title header, a Browse Items link and a search widget. I cannot find where the arguments referenced in this code: “head(array(‘bodyid’=>‘home’, ‘bodyclass’ =>‘two-col’))” are declared.
I would greatly appreciate any help so that I can separate out the results I want to keep and those I wish to eliminate.

These are all managed within the file common/header.php. This is the header that will appear on all the pages within your Omeka Classic site, so if you remove the title header, search, and navigation there, you remove them from every page within your site.

Kim,
Thank you. This is very helpful.

Okay, I tried the approach I originally outlined in my original post and it didn’t work because, as Kim warned, the changes I made to the Index.php file were repeated in every page after that. Is there any way to make a generic landing page (no reference to items, no Browse Items link and no search widget) to describe the site which also contains the Login and Register links of the GuestUser plugin?

So the way to go here is probably to duplicate the common/header.php file. Leave the original one alone, so it’s used for the rest of your site, and name the copy something like common/header-home.php. Make your changes to remove elements you don’t want in the homepage in that copy.

Then, in index.php, replace the line

echo head(array('bodyid' => 'home', 'bodyclass' => 'two-col'));

with

echo common('header-home', array('bodyid' => 'home', 'bodyclass' => 'two-col'));

to make just the homepage use the different header file.

You could instead do something like adding if statements to the header file to skip things just for the homepage (for example by checking if the bodyid variable is equal to 'home') but just making a duplicate header might be simpler to deal with.

John,
Thanks so much for the suggestion. I will give it a try.
Steve

John,
Your suggestion has been invaluable. I have created my custom “index-home.php” page with the proper header from the GuestUser plugin. However, I have to name it index.php for it to be my new landing page. Now, I am stuck on the last task. I want to make this new index my standard landing page, but if a registered user logs in, he/she is taken to the original default index file with the browse items, etc links. How do I set up that navigation?
Steve

Switching the homepage based on if a user is logged in is a different problem but you can solve it in a similar kind of way:

Take your current index for logged-in users and call it, say, index-users.php. And call the “for the public” one index-public.php.

Then, make a new file called just index.php with this content:

<?php
if (current_user()):
    require __DIR__ . '/index-users.php';
else:
    require __DIR__ . '/index-public.php';
endif;

What you’re doing is replacing the index (home) page with one that actually just decides which of the two files to load based on whether there’s a user logged in.

John,
Thanks for your quick reply. The solution worked beautifully.
Steve