[Koha-devel] Re: About adding a custom field in KOHA

scott tacogrande55 at hotmail.com
Tue Jan 5 21:18:53 CET 2010




nitesh rijal <rijal.it at ...> writes:

> 
> 
> Hello all.
> 
> I am trying to make GSDL fulltext integration in KOHA in a different way as it
is now. I added a field in the Default MARC framework structure.
> 
> I have added a field 952'x' naming it Fulltext. Here I want to store a flag
"YES" or "NO" to identify whether I have a fulltext for the current item or not.
> 
> 
> I also added a field in the table "biblioitems" of type enum("YES","NO"). My
problem is that, I want the "View Full Text" link only in those search results
which have 952'x' = YES . How can I make this possible???
> 
> 
> I have attached a screenshot as how is the link looking right now.
> 
> Please Help.
> 
> Thank you.
> 
> -- Nitesh RijalBE ITemail: rijal.it <at> gmail.com
> 
> url: http://niteshrijal.com.npfacebook: http://facebook.com/openrijaltwitter:
http://twitter.com/openrijal
> 
> +9779841458173
> 
> 
> 
> 
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at ...
> http://lists.koha.org/mailman/listinfo/koha-devel

You will want to first look at how HTML::Template works, 
http://search.cpan.org/~samtregar/HTML-Template-2.9/Template.pm

then open up in your editor opac-search.pl and opac-search.tmpl

make a function in the perl that checks before it prints out all the data for
each entry. Will be in a while or for loop. Make a boolean that checks true if
that entry in the database is true or false if false and then that boolean needs
to flag the template variable in the perl script saying hey its true, or its not.

Then on the html side in the .tmpl file, find where it prints the view full
text. Put it in the HTML::Template boolean field ex:
  <TMPL_IF NAME="fulltext"> Full Text </TMPL_IF>

else it wont print :)

Sorry its not the exact definition but that should get you started and you
should be able to figure out by following and looking inside the perl script how
its all working, good luck.




_______________________________________________
Koha-devel mailing list
Koha-devel at nongnu.org
http://lists.nongnu.org/mailman/listinfo/koha-devel



More information about the Koha-devel mailing list