Ok,
I really hate to be a pain here - but.... ;-)
So I am in TemplateDefault.pm - and I am where $DocTitle is being populated with the title that will show up in the search results..
my $DocTitle = $results->config('title_property') || 'swishtitle';
So I am 'just' trying (for right now) to get it to show the 'strong' instead of the 'title_property'... So I changed the string to:
my $DocTitle = $results->Property('strong');
and nothing.. it errors out.. I saw many variations of the '$results->Property' field in the archives - and I tried all of them: $results->property, $res->Property, $res->property, as well as a variation of single and double quotes (again because I saw a mixture in the archives)...
For the life of me I cannot get it to just show that defined PropertyName on the output of the search.... what am I missing here??
thanks!
josh
>-----Original Message-----
>From: users-bounces@lists.swish-e.org
>[mailto:users-bounces@lists.swish-e.org] On Behalf Of Peter Karman
>Sent: Thursday, October 25, 2007 2:55 PM
>To: Swish-e Users Discussion List
>Subject: Re: [swish-e] Change the indexed 'title'
>
>
>
>On 10/25/2007 01:24 PM, josh@relativelysane.com wrote:
>> actually i mis-quoted what i need here... been playing with perl for a
>good hour now and can't seem to get it.
>>
>> I am in the swish.cgi file - right where it defines the title_property:
>"title_property => 'swishtitle',"
>>
>> Its there I want to do a if/then statement.. I am sure the problem has
>something to do with comma's and/or semi-colons; but i tried every
>combination i could think of ;-)
>>
>> Want something like what is below (keeping it to only a few things for
>testing):
>>
>>
>> If ('swishtitle' ne '') {
>> title_property => 'swishtitle';
>> } elseif ('strong' ne '') {
>> title_property => 'strong';
>> } else {
>> title_property => 'swishdocpath';
>> }
>>
>
>Your title property can't be assigned in the config, because you don't know
>what it is till after the query has run. I.e., it all depends on the value
>of
>the 'flavor' property for each result. You need to modify where the results
>are
>output, to test for $flavor there.
>
>--
>Peter Karman . peter(at)not-real.peknet.com . http://peknet.com/
>
>_______________________________________________
>Users mailing list
>Users@lists.swish-e.org
>http://lists.swish-e.org/listinfo/users
>
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Fri Oct 26 13:44:33 2007