OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



how to show more details?

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

how to show more details?

Postby xmu_chen » Sun Jan 11, 2009 7:37 pm

dear sir,
when i view an archive, or search the database with a query, every item only shows title, creator, date, view record and view original. now, i want it to show more details, for example, the subject, description and so on. where can i add the code to get the function?

thank you very much!
xmu_chen
 
Posts: 22
Joined: Tue Oct 30, 2007 6:07 am

Re: how to show more details?

Postby asmecher » Wed Jan 14, 2009 2:34 pm

Hi xmu_chen,

You can edit the Smarty template responsible for summarizing a record in the plugin directory for the schema plugin you're using. If you're harvesting Dulbin Core metadata, for example, look in the plugins/schemas/dc/summary.tpl template.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: how to show more details?

Postby xmu_chen » Thu Jan 15, 2009 12:07 am

Thank you!
I try it.
xmu_chen
 
Posts: 22
Joined: Tue Oct 30, 2007 6:07 am

Re: how to show more details?

Postby xmu_chen » Thu Jan 15, 2009 8:13 pm

Hello, Alec Smecher,
Gratulations!
Now, the item can show title, creator,subject,description and type at the result page.
To perfect, I have another question to ask you. I want the item to show the information which database the item is been harvested from. For example, some keyword have several results which been harvested from several databases(archives). now I want that the user can differentiate the different resource(archives) of the items at the result page.

It seems that can not add archive id or archive title in the summary.tpl .

Do you have any idea or advise to get the function?

thank you!

(We will begin our winter vacation from tomorrow to Feb.16. and I will continue to test it according to your help next term.
Best wishes to you !)
xmu_chen
 
Posts: 22
Joined: Tue Oct 30, 2007 6:07 am

Re: how to show more details?

Postby asmecher » Tue Feb 03, 2009 11:34 am

Hi xmu_chen,

You can use the $record->getArchive() function to get the archive object for a record, i.e. by using something like the following in the Smarty template:
Code: Select all
{* Get the archive object from the record object *}
{assign var=theArchive value=$record->getArchive()}
{* Now display the archive title *}
{$theArchive->getTitle()|escape}
The above code hasn't been tested but should work OK.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 1 guest