Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Eventslist-View | modifying template (w.i.p.) 6 years 8 months ago #20239

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492
Joomla: 3.4.5
JEM: 2.1.5

Maybe usefull or not but am going to modify the layout of the default "eventslist" view.
Basicly i do want to have a filter, but i don't want to have it in the current table layout.

The thing i'm thinking of will be more in the the way it's displayed in the topic.
www.joomlaeventmanager.net/forum/tutoria...label-for-date#20224

When modifying the file in the component folder it will be overwritten by an update so using the override folder would be good. Am thinking of adding a new tmpl file so there can be a choice between default / other layout. And yep in my case i do know how to modify the files.

Won't go into detail, but if there is anything to post i'll try to do so :)
Also good to know: changes won't be committed to Github

as stated "work in progress...."

Greetings,
Blue
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

Last edit: by Bluefox.

Eventslist - modifying template - (w.i.p.) 6 years 8 months ago #20240

perhaps it would be better to say - the simplelist view . eventslist gives sometimes misunderstandings in my brain.

I am wondering. Could this be in a form of a template? So admin can choose?
on JEM 2.3.3 stable in latest Joomla (3.10.2) Protostar php7.4.15
Personally I use t4_B5 template with t4_system plugin framework with bootstrap 5 and fontawesome)
(I prefer free "Signal" or paid "Threema" instead of "Whatsapp".)

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

Last edit: by jojo12.

Eventslist - modifying template - (w.i.p.) 6 years 8 months ago #20242

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492

perhaps it would be better to say - the simplelist view . eventslist gives sometimes misunderstandings in my brain.

You are right it was better to rename the title of the topic..

I am wondering. Could this be in a form of a template? So admin can choose?

Yes, but it will require a change in the eventslist-view default.xml file.

Did add a custom field of type "componentlayout" to it and doing so it was possible to select the file needed.
That file was located in the templates/protostar/html/com_jem/eventslist folder.
But did also remove the common folder and changed the view.html.php
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

Eventslist - modifying template - (w.i.p.) 6 years 8 months ago #20243

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492
changes in the component folder..
and yep there are probably better ways.


default.xml
Added this in the default.xml
<field name="mylayout" type="componentlayout" extension="com_jem" view="eventslist" label="JFIELD_ALT_LAYOUT" useglobal="true" description="JFIELD_ALT_COMPONENT_LAYOUT" />


view.html.php
defined('_JEXEC') or die;

// require JPATH_COMPONENT_SITE.'/classes/view.class.php';

/**
 * Eventslist-View
*/
class JemViewEventslist extends JViewLegacy
{
	function __construct($config = array())
	{
		parent::__construct($config);

		// additional path for common templates + corresponding override path
		// $this->addCommonTemplatePath();
	}
.................
....................
/**
	 * Adds a row to data indicating even/odd row number
	 *
	 * @return object $rows
	 */
	public function getRows($rowname = "rows")
	{
		if (!isset($this->$rowname) || !count($this->$rowname)) {
			return;
		}
	
		$k = 0;
		foreach($this->$rowname as $row) {
			$row->odd = $k;
			$k = 1 - $k;
		}
	
		return $this->$rowname;
	}

and that means you have to copy the default_event_table.php from the "common" folder. The reason for me to alter it as i don't like to have the files seperated from the view. It will mean that if you want to have the layout in the other views too you have to copy/edit things for the individual views. and yep can also remove the lines but decided to disable the lines first so it's easier to revert.

...to be continued...
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

Last edit: by Bluefox.

Eventslist - modifying template - (w.i.p.) 6 years 8 months ago #20245

you're right - I remember - when there came this common way, I was wondering. But for me it was always a bit strange to search it in common :-)
on JEM 2.3.3 stable in latest Joomla (3.10.2) Protostar php7.4.15
Personally I use t4_B5 template with t4_system plugin framework with bootstrap 5 and fontawesome)
(I prefer free "Signal" or paid "Threema" instead of "Whatsapp".)

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

Eventslist - modifying template - (w.i.p.) 6 years 8 months ago #20266

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492
about the layout
there are all kind of ways possible to display the events but was wondering if you (or others) do have suggestions of how you like it to be displayed? Maybe it can be usefull in the future and maybe some of it can be added to Github. It would be nice if you have screenshots/live links as it will be better to get the picture then words.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

  • Page:
  • 1
Time to create page: 0.364 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......