search navigation
Permalink
hi, could someone please help me,
im searching for a way to add a breadercrubmb in search results that will show in every result in which location are the page result
thank you.
im searching for a way to add a breadercrubmb in search results that will show in every result in which location are the page result
thank you.
sorry, not working.
maybe im not put the code in the right place,
whare to post the code and whare i told him show me the var
maybe im not put the code in the right place,
whare to post the code and whare i told him show me the var
I don't think this is what you're asking for -- you want the breadcrumb trail to show up for every search result, right?
In that case you need to create a custom template for the search block and put some custom code in there:
1) Create a new directory on your server at YOURSITE/blocks/search/
2) Copy YOURSITE/concrete/blocks/search/view.php to that new directory you made (so the new copy is at YOURSITE/blocks/search/view.php)
3) Edit that new copy of the file and make these changes:
Around line #24, just below this line:
add this line:
And, around line #37 or 38, replace this code:
with this code:
In that case you need to create a custom template for the search block and put some custom code in there:
1) Create a new directory on your server at YOURSITE/blocks/search/
2) Copy YOURSITE/concrete/blocks/search/view.php to that new directory you made (so the new copy is at YOURSITE/blocks/search/view.php)
3) Edit that new copy of the file and make these changes:
Around line #24, just below this line:
$tt = Loader::helper('text');
add this line:
$nh = Loader::helper('navigation');
And, around line #37 or 38, replace this code:
<span class="pageLink"><?php echo $this->controller->highlightedMarkup($r->getPath(),$query)?></span>
with this code:
<span class="pageLink"> <?php $parents = array_reverse($nh->getTrailToCollection(Page::getByID($r->getID()))); $breadcrumbs = array(); foreach ($parents as $p) { $breadcrumbs[] = '<a href="' . $nh->getLinkToCollection($p) . '">' . $p->getCollectionName() . '</a>'; } echo implode(' > ', $breadcrumbs); ?> </span>
hi jordan, first of all thanks,
second yes its what i needed
and three, sadley its not working its give me the next error:
[code]tal error: Call to a member function getLinkToCollection() on a non-object in /home/btihost/domains/g2u.co.il/public_html/blocks/search/view.php on line 46[\code]
second yes its what i needed
and three, sadley its not working its give me the next error:
[code]tal error: Call to a member function getLinkToCollection() on a non-object in /home/btihost/domains/g2u.co.il/public_html/blocks/search/view.php on line 46[\code]
Oops, sorry, that should be "$nh->getLinkToCollection($p)" (not "$ni->getLinkToCollection($p)") -- replace $ni with $nh.
(I've since corrected my sample code in the previous comment)
(I've since corrected my sample code in the previous comment)
thank you very much!! is great!
maybe you could tell thare is a way to make to look better and inside a frame (not iframe) that will be a scroller but the template remain the same (like iframe)
maybe you could tell thare is a way to make to look better and inside a frame (not iframe) that will be a scroller but the template remain the same (like iframe)
Sorry, I'm not sure what you mean. What exactly do you want to look better? How do you want it to look?
jordan leave the design part i wil css it,
but if thare is way to put it in a "iframe" or something similar to that, because i want the template will not move and it will be inside a box or something i dont know how to do it if you could help me with that i will be glad
but if thare is way to put it in a "iframe" or something similar to that, because i want the template will not move and it will be inside a box or something i dont know how to do it if you could help me with that i will be glad
yep, works great!!!
sorry to Bother you but thare is a serious problem in my site with jumping objects and i post few hours ago it seems to be you know the system well you have any idea for the reason?
http://www.concrete5.org/community/forums/usage/hi-jumping-problems...
sorry to Bother you but thare is a serious problem in my site with jumping objects and i post few hours ago it seems to be you know the system well you have any idea for the reason?
http://www.concrete5.org/community/forums/usage/hi-jumping-problems...
'like iframe but not" sounds like simply outputting this code into a div with a set height and width, and then setting the div overflow to auto in your css. This would give you a scrolling "frame", and you could even find some javascript to allow you to use a custom designed scrollbar. Hope it helps! :-)
Note: I haven't tested this but in theory it should work for you.