J and Beyond 2013 | An International Joomla! Conference - May 31st - 2nd, 2013, Noordwijkerhout, The Netherlands
It is currently Mon May 20, 2013 7:15 pm

JEvents breadcrumbs integration?  Topic is solved

Proposed new features of merit and bugs to be fixed. Messages are moved here from the main forum by moderators.

Gold and Silver members can add posts here directly.

Re: JEvents breadcrumbs integration?

Postby Geraint » Sat Jul 25, 2009 8:16 pm

A good idea - its on the list.
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30529
Joined: Fri Feb 15, 2008 6:14 pm

Re: JEvents breadcrumbs integration?

Postby skeg64 » Wed Jul 21, 2010 3:39 am

I managed to hack up this solution:

Code: Select all
/*
* Handle the breadcrumbs
*/

global $mainframe;
global $rowtitle;

$currview   = JRequest::getCmd('view');
$task   = JRequest::getCmd('task');
$year = JRequest::getCmd('year');
$month = JRequest::getCmd('month');

$pathway =& $mainframe->getPathway();

switch ($task) {
   case 'month.calendar': //we are viewing a specific month calendar
      if($currview == 'month') break; //we are viewing the default month view
      $monthstring = date("M", mktime(0, 0, 0, $month, 1, $year));
      $pathway->addItem($monthstring . ' ' . $year, '');
      break;
   case 'icalrepeat.detail': //we are viewing an event detail
      $monthstring = date("M", mktime(0, 0, 0, $month, 1, $year));
      $pathway->addItem($monthstring . ' ' . $year, 'index.php?option=com_jevents&task=month.calendar&month='. $month . '&year='. $year);
      $pathway->addItem($rowtitle, '');
      break;
case 'year.calendar': //we are viewing a yearly calendar
      $pathway->addItem($year, '');
      break;
}


I put this in defaultviewhelperfooter.php and made the $rowtitle variable global. It only works for monthly and yearly calendar views and event detail views, as I don't use any others.

This outputs the breadcrumbs as described, but perhaps a better way would be to show Home > Jevents > Year > Month > Event title.

P.S. I know this is hacky!
skeg64
Posts: 14
Joined: Mon Apr 19, 2010 1:34 am

Re: JEvents breadcrumbs integration?

Postby Geraint » Wed Jul 21, 2010 10:59 am

This is nice - and a good idea to put it in the footer helper.

Did you do this as a template override of the helper function? If you did then this customisation will not be lost when you upgrade.

Simply copy the modified file to templates/YOUR TEMPLATE/html/com_jevents/helpers/

Geraint
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30529
Joined: Fri Feb 15, 2008 6:14 pm

Re: JEvents breadcrumbs integration?

Postby chrisdavies71 » Fri Aug 05, 2011 9:05 pm

How would i go about doing this in Joomla 1.6?
chrisdavies71
Gold Members
Posts: 130
Joined: Mon Oct 11, 2010 1:09 am

Re: JEvents breadcrumbs integration?

Postby Geraint » Sat Aug 06, 2011 8:22 am

The same code will work in Joomla 1.6 but you would need to put it into templates/YOUR TEMPLATE/html/com_jevents/helpers/defaultviewhelperfooter16.php
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30529
Joined: Fri Feb 15, 2008 6:14 pm

Re: JEvents breadcrumbs integration?

Postby chrisdavies71 » Sat Aug 06, 2011 12:42 pm

Hi Geraint,

The code does not seem to work in 1.6. It causes the following error:

Fatal error: Call to a member function getPathway() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/templates/rt_panacea_j16/html/com_jevents/helpers/defaultviewhelperheader.php on line 40.

I have chosen to put it in the header but that should not make any difference should it? It did not in J1.5.

I have done some research and I believe it has something to do with global $mainframe not being used in J1.6.

I have changed that bit of code to the following based on info on the joomla website:

$app = JFactory::getApplication();
$pathway = $app->getPathway();

This no longer throws up the error but it screws up the page layout and does not add the event title into the breadcrumbs. See sceenshot attached

Many Thanks for all your help

CHRIS
Attachments
screenshot 1.tiff
screenshot 1.tiff (226.45 KiB) Viewed 2055 times
chrisdavies71
Gold Members
Posts: 130
Joined: Mon Oct 11, 2010 1:09 am

Re: JEvents breadcrumbs integration?

Postby chrisdavies71 » Sat Aug 06, 2011 5:49 pm

I have managed to sort out the layout problems but still not able to get it to display the event title as per the screenshot

Cheers

CHRIS
chrisdavies71
Gold Members
Posts: 130
Joined: Mon Oct 11, 2010 1:09 am

Re: JEvents breadcrumbs integration?

Postby Geraint » Sun Aug 07, 2011 1:27 pm

In the event detail if statement block you can add this:
Code: Select all
$row=$view->data['row'];
$title = $row->title;

then use the $title in the breadcrumb
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30529
Joined: Fri Feb 15, 2008 6:14 pm

Re: JEvents breadcrumbs integration?

Postby chrisdavies71 » Mon Aug 08, 2011 10:05 am

Hi Geraint,

I am still struggling with this, what i have got so far is:

in defaultviewhelperheader16.php

$pathway->addItem(ucwords($title), '');

I'm not sure where exactly the other bit of code should go. Any chance you could give me a file and approx line number.

Many Thanks

CHRIS
chrisdavies71
Gold Members
Posts: 130
Joined: Mon Oct 11, 2010 1:09 am

Re: JEvents breadcrumbs integration?

Postby chrisdavies71 » Wed Aug 10, 2011 8:43 pm

Hi Geraint,

Any ideas on this?

Many Thanks

CHRIS
chrisdavies71
Gold Members
Posts: 130
Joined: Mon Oct 11, 2010 1:09 am

Next

Return to Feature Requests/Suggestions

Who is online

Users browsing this forum: No registered users

Main Menu

User Menu

Hosted By


Who is online

In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
Most users ever online was 94 on Tue Sep 01, 2009 12:33 am

Users browsing this forum: No registered users

Login Form