Search Results [DISPLAY ANY Flexicontent FIELD]

More
13 years 10 months ago #17584 by chenz2
It will not let me put that code into the area I need it. That code only works it you put it outside the showing of the other fields. I need that field to show above some of the other fields and not below it. That's where I am running into problems. It works if I put it underneath everything. But when I insert it inside like
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>"; <?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; ?> if (!$item->onDemandFields['fileupload']->noaccess) echo "<div class='filebox'>".$fileupload."</div><br>"; ?>

I get: Parse error: syntax error, unexpected '<' in /home/test/public_html/old/components/com_search/views/search/tmpl/default_results.php on line 33 ( which is <?php if ( $result->href ) : )

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

More
13 years 10 months ago #17585 by chenz2
I think I got it... the code would be:
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 ($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; ?> <?php if (!$item->onDemandFields['fileupload']->noaccess) echo "<div class='filebox'>".$fileupload."</div><br>"; ?>

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

More
13 years 10 months ago #17595 by ggppdk
That should be unless you have some small syntax error.

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 #17690 by chenz2
Any chance that tags can be searched too with the search plugin instead of just titles? Or is that something I'd have to probably hire someone to get done?

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

More
13 years 8 months ago #19580 by ggppdk
New advanced search feature of v1.5.6 will support searching tags


-- 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 7 months ago #19870 by pshoeg

ggppdk wrote: 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'm trying to do this in Joomla 1.7/FlexiContent 2.0, because I want SEF links in the search results — when clicking on a search result I'm taken directly to the article without menu modules.
I get this error:
Code:
Notice: Undefined property: JObject::$slug in ... default_results.php Undefined property: JObject::$categoryslug in ... default_results.php Array to string conversion in ... /libraries/joomla/html/parameter.php

The links are all pointing to the page I was searching from. What do I have to do differently in FlexiContent 2.0

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.468 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