Main menu

Forum


Display the Events in a Table View

  • bilal.abdeen
  • Topic Author
  • New Member
  • New Member
More
8 years 3 months ago #11980 by bilal.abdeen
Display the Events in a Table View was created by bilal.abdeen
I wonder if somebody tried to display the events in a table view, something like the following.
DayTimeEventLocation
Monday9:45 AMSubject # 1Class # 1
Tuesday10:15 AMSubject # 2Class # 2
The following user(s) said Thank You: daikaadsteve

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 3 months ago #11993 by Lyr!C
Replied by Lyr!C on topic Display the Events in a Table View
Hello,

You can with a custom theme pack, but i will recommend you not to use <table> but a div structure using css to display data as a table.

Something like this : snook.ca/archives/html_and_css/getting_your_di

Hope this helps ?

Best Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

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

  • bilal.abdeen
  • Topic Author
  • New Member
  • New Member
More
8 years 3 months ago #12004 by bilal.abdeen
Replied by bilal.abdeen on topic Display the Events in a Table View
I have done it, and now testing it. However, I could not manage to limit my changes to the theme files. I wonder if you have better suggestions of how to do this, because my current solution would break if I apply any upgrades to this excellent extension. Following are the details of what I did.

A. Objective:
As I said above, to show all events in a table format.

B. My attempted solution:
1. I created a "Weekly" template. I made a copy the folder (\components\com_icagenda\themes\packs\default\) and called it weekly. Moreover, I created the xml file (\components\com_icagenda\themes\weekly.xml)

2. I tried implementing my changes in the script (\components\com_icagenda\themes\packs\weekly\weekly_events.php)

C. Problem:
I found that the weekly_events script is responsible for the display of only single events. The core script (\components\com_icagenda\views\list\tmpl\default.php) is the one responsible for fetching all events. So, I had to make changes to it. Obviously, all my changes will be overridden if an upgrade is applied to this extension.

If you are interested in more details, please refer to the attached version of the default.php script. This version has all of the changes in one place. It does not use the theme file weekly_events.php. This could be easily fixed. However, it is done this way, for now, to be able to see the code in one place.

Thank you so much for your help... :)

File Attachment:

File Name: default.zip
File Size:4 KB
Attachments:

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 3 months ago - 8 years 3 months ago #12021 by Lyr!C
Replied by Lyr!C on topic Display the Events in a Table View
Hi!

So first, to not have your changes removed by an update, don't edit core files, but dupplicate ;-)

About the theme pack of iCagenda, what you can do it to copy/paste the files and folder (for example, default) and rename all the occurences of "default" (in your case) by "yourthemename" in files names AND inside all files.
Then, you will be able to select your custom theme pack in the menu options ;-)

Old tutorial video, but still the same process : icagenda.joomlic.com/docs/docum
entation/8-video-tutorials/31-create-your-first-theme-pack

1. I created a "Weekly" template. I made a copy the folder (\components\com_icagenda\themes\packs\default\) and called it weekly. Moreover, I created the xml file (\components\com_icagenda\themes\weekly.xml)

2. I tried implementing my changes in the script (\components\com_icagenda\themes\packs\weekly\weekly_events.php)

Removed previous comment, as i see you have found the way! ;-)

Note that you can know the important changes made in the future, by checking this area of documentation (this could help to keep your theme pack up-to-date with future improvements of iCagenda) : icagenda.joomlic.com/docs/documentation/...e/theme-pack-upgrade
Note that until iCagenda 4.1.0 (not for before end of year, or maybe next year...), i won't change a lot the theme packs. But in 4.1.0, i have planned to create a full new theme pack system (i will do my best to keep old theme pack based on iCagenda 3 to be backward compatible, but the new system i will work on will allow more for custom theme pack).

It's true that the theme pack layout is for one event.
In your case, you have to do a override of the view list too!
This override is in fact a copy of the file ROOT/components/com_icagenda/views/list/tmpl/default.php into your template site folder, here :
ROOT/templates/[YOUR TEMPLATE]/html/com_icagenda/list/default.php

IMPORTANT : in 3.6.0, all the views will be changed, and default.php file for list will be really simplify, and easier to override!
So 2 solutions :
- wait 3.6.0 to be released (not before 1 or 2 months for free version, but already available with new list views, in alpha version, for Pro Users).
- Or do you change in current version, and then redo the change on update to 3.6.0 (this version 3.6 of iCagenda will have many improvements, more performance, and more options and flexibility!)

Hope this answers some of your questions ?

Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

Last edit: 8 years 3 months ago by Lyr!C.

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

  • bilal.abdeen
  • Topic Author
  • New Member
  • New Member
More
8 years 3 months ago #12026 by bilal.abdeen
Replied by bilal.abdeen on topic Display the Events in a Table View
Thank you so much for this hint. For the benefit of others:
If you want to override the extension's core file \components\com_icagenda\views\list\tmpl\default.php, make a copy in the following folder, which you need to create. Then, make your changes in this new version of the file.
\templates\<YOUR-TEMPLATE>\html\com_icagenda\list\

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

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
8 years 3 months ago - 8 years 3 months ago #12031 by Lyr!C
Replied by Lyr!C on topic Display the Events in a Table View
You're welcome!

Note that overrides system in template, is a standard of Joomla itself, and this is possible with all extensions using the MVC standards structure of Joomla (almost all good extensions do!)

Note too that there are a lot of more possibilities added to latest versions of Joomla 3, with Layouts overrides.
That means today, with Joomla 3.4, you can almost override every part of Joomla, whitout editing core code! (and keep your custom changes saved when updates ;-) )

About iCagenda views, today you need to have the overrid for view / list / default
In the future, when i will work on refactory of THeme pack system, i will add more layouts for the theme packs.
So, for events list, you will have something like that :
- list_filters.php
- list_header.php
- list_event.php (this is the current layout "THEMENAME_events.php" in the theme pack, and note that in the refactory, i will simplify names of files ;-) )
- list_footer.php
- ...

So, many things to come (maybe not this year, as first my goal is to improve all the logic, structure, and core functionnalities needed!)
And in the same time, i can't yet introduced all ideas as iCagenda 3 is still crossplatform Joomla 2.5/3.
So, removing Joomla 2.5 when i will start iCagenda 4, will help to use more Joomla 3 core extented possibilties ;-)

About your special need (a table), note that you can just work on the view override in your site template, as you can copy paste the code your THEME_events.php inside the html/com_icagenda/list/default.php, to replace the line :
require $tpl_events;
;-)

For info, a preview of the default.php file for list of events, as it is now, really simplified, in 3.6.0-alpha1 :
// No direct access to this file
defined('_JEXEC') or die();

// Shortcut for item
$item = $this->item;
?>

<div id="icagenda" class="ic-event-view<?php echo $this->pageclass_sfx; ?>">

	<?php // Top Buttons ?>
	<?php echo $this->loadTemplate('top'); ?>

	<?php
	echo "<!-- " . $this->template . " -->";

	// iCagenda Vars
	require_once $this->icevent_vars;

	// Theme Pack layout
	require_once $this->themeEvent;
	?>

</div>
<div>&nbsp;</div>

<?php
$this->dispatcher->trigger('onEventAfterDisplay', array('com_icagenda.event', &$item, &$this->params));
So, you will see that i have already simplify a lot the code! ;-)

Best Regards,
Cyril

Latest version : iCagenda 3.9.3
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

Last edit: 8 years 3 months ago by Lyr!C.

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

  • bilal.abdeen
  • Topic Author
  • New Member
  • New Member
More
8 years 3 months ago #12032 by bilal.abdeen
Replied by bilal.abdeen on topic Display the Events in a Table View
Cyril,

Thanks for the details. You are really working hard to enhance this already excellent extension.

Yes, I have actually figured out that I don't need to load $tpl_events. So, I removed the line (require $tpl_events;) from my customised code in the script (html/com_icagenda/list/default.php).

Keep up the good work...
The following user(s) said Thank You: Lyr!C

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

Time to create page: 0.334 seconds

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new