Re: [greenstone-users] Home page stuff

From Katherine Don
DateTue, 06 Mar 2007 11:41:38 +1300
Subject Re: [greenstone-users] Home page stuff
In-Reply-To (45DCA560-40900-sdb-org)
Hi Julian

The problem is that the collection is being opened for an onChange event
in the list, but if you select the first one, it hasn't changed, so the
code is not triggered. I have modified the source code to add in a dummy
first entry in the list, so that all collections are selectable.

If you want to do this yourself, you'll need to modify
greenstone/src/recpt/pageaction.cpp, look for

void pageaction::home_pulldown(displayclass &disp, recptprotolistclass
*protos,
cgiargsclass &args, const recptconf &configinfo,
ostream &logout) {

text_t homeextra = "<form method="get" name="browse"> ";
homeextra += "<select name="collections" onChange="location.href=";
homeextra +=
"document.browse.collections.options[document.browse.collections.selectedIndex].value"> ";

and add the following line directly after this:
homeextra += "<option value="">_textdescrselcol_</option> ";

Then recompile.

Regards,
Katherine

Julian Fox wrote:

> Sorry, but yet another small question:
> Using the HomePageType element in main.cfg I've switched to a dropdown
> list instead of the collection images showing up. But I find that the
> first in the list won't open. Why I wonder? No problems with the
> second item in the list.
> I chose this option partly because I don't know how to control the
> size of the image that arrives there! In fact it's too big each time -
> is there an easy way I can adjust those images to my liking? I note
> that they are the right size (v. small) on the 'about' page - so why
> so large on the home page?
> Julian
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
>