Search Results [DISPLAY ANY Flexicontent FIELD]

More
13 years 10 months ago #17509 by chenz2
What piece of code would I add to the default_results.php file that will show a link to the detail page of an item in the search results? None of the fields that show up in the search results page for an item are clickable to link to the detail page so I'm not sure what to do.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #17510 by ggppdk
com_search by default, lists the item title which is clickable, why you say you have no link ?????
You removed the code? It is in the file i posted.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #17552 by chenz2
Because I can't use the search results joomla gets back to me on the same screen as yours. They are just a repeat, in text form, of what your results give back. The title tag from your script does not auto link to the item. I have:
Code:
if (!$item->onDemandFields['thumb1']->noaccess) echo "<div class='imagebox1'>".$thumb1."</div>"; if (!$item->onDemandFields['title']->noaccess) echo "<div align='center'>".$title."</div>"; if (!$item->onDemandFields['categories']->noaccess) echo "<div align='center'>". $categories."</div>"; if (!$item->onDemandFields['fileupload']->noaccess) echo "<div class='filebox'>".$fileupload."</div>";

Also, when logged in and the search results show the file field, it does not let the user download the file. Clicking on the link goes back to the search results page as url testsite.com/component/search/?id=41&cid=139&fid=16&task=download

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #17553 by ggppdk
Link to download is not working because we are inside component com_search: and the component was not set in the link by Flexicontent file plugin.

Goto file: plugins/flexicontent_fields/file.php
change line that has "task=download" (about line 239)
Code:
$str = '<form id="form-download-'.$field->id.'-'.($n+1).'" method="post" action="'.JRoute::_( 'index.php?id='. $value .'&cid='.$field->item_id.'&fid='.$field->id.'&task=download' ).'">';
with
Code:
$str = '<form id="form-download-'.$field->id.'-'.($n+1).'" method="post" action="'.JRoute::_( 'index.php?option=com_flexicontent&id='. $value .'&cid='.$field->item_id.'&fid='.$field->id.'&task=download' ).'">';

About title try this, just after:
$item = $itemmodel->getItem();
put
Code:
$item_link = JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug));
and then replace all occurrences of
Code:
<a href="<?php echo JRoute::_($result->href);?>" ...
with
Code:
<a href="<?php echo $item_link;?>" ...

I updated my previous post files to include the changes

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #17576 by chenz2
Download file works now :-)

This title link... I put:
Code:
if (!$item->onDemandFields['title']->noaccess) echo "<div align='center'>".$item_link."</div>";

But it only shows of course the url for the item in text form: /old/easter/item/139-easter-28

Do you know the right syntax to get the a href around that title link?

Also, do you have a paypal email? I'd like to give you something for all the great help.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #17578 by ggppdk
Not this way you have to make an <a> html tag as i said in my previous post.
Like this:
Code:
<?php if ( $result->href ) : if ($result->browsernav == 1 ) : ?> <a href="<?php echo $item_link; ?>" target="_blank"> <?php else : ?> <a href="<?php echo $item_link; ?>"> <?php endif; echo $this->escape($result->title); if ( $result->href ) : ?> <?php endif; ?>

I didnot write complete code because i said to use to replace the existing code, but i remember you removed the existing code because you wanted to be more customized or something.

Anyway above is the code you asked.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.314 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save