help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Feature requests for JEM 2.0 - initial public release

[JEM 3.0.2] - Link zur Detailseite

[JEM 3.0.2] - Link zur Detailseite

10 years 3 weeks ago - 10 years 3 weeks ago
#15982
In den Grundeinstellungen kann man ja wählen, ob der Titel zur Veranstaltungsseite verlinkt werden soll oder nicht. Es wäre schön, wenn es die zusätzliche Option gäbe "Nur verlinken, wenn Detailbeschreibung vorhanden". Bisher habe ich das in Eventlist 1.0.2 per CoreHack umgesetzt:
com_eventlist\views\eventlist\tmpl\default_table.php
ab Zeile 162
Code:
<td headers="el_title" align="left" valign="top"> <?php if ($this->escape($row->datdescription) != "" ) echo "<a href=", $detaillink, ">" ; ?> <?php echo $this->escape($row->title); ?> <?php if ($this->escape($row->datdescription) != "" ) echo "</a>" ; ?> </td>
Wie kann ich das in JEM umsetzen? Die entsprechende Datei müsste doch sein:
com_jem\views\eventslist\tmpl\default_events_table.php ab Zeile 136
Last edit: 10 years 3 weeks ago by Bluefox.

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

Re: Link zur Detailseite

10 years 3 weeks ago
#15988
hi there,

the option you're describing is something that can be added (in my opinion).

it's relative simple to add and maybe it can be usefull for others.


about JEM:
what version are you using? if it's JEM 2.x then you need to look into the "common" folder and indeed default_table.php
The following user(s) said Thank You: myrtus

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

Re: Link zur Detailseite

10 years 3 weeks ago
#15989
Hello Bluefox,
thanks for answer. I'm using version 3.0.2 and I think the following lines (com_jem\views\eventslist\tmpl\default_events_table.php from line 136) are the code I have to change:
Code:
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : ?> <td class="jem_title" align="left" valign="top"> <a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url"> <span itemprop="name"><?php echo $this->escape($row->title); ?></span> </a> </td> <?php endif; ?>

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

Re: Link zur Detailseite

10 years 3 weeks ago
#15990
you're right it are those lines but be aware that we don't have a field "datdescription" for the moment. instead we do have a field "introtext". it's likely that it will be changed to eventtext in the future.

so it will be something like:
Code:
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : ?> <?php if ($this->escape($row->introtext) != "" ) { ?> <td class="jem_title"> <a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url"> <span itemprop="name"><?php echo $this->escape($row->title); ?></span> </a> </td> <?php } else { ?> <td class="jem_title" itemprop="name"> <?php echo $this->escape($row->title); ?> </td> <?php } ?> <?php endif; ?>


in this case we're using "showdetails, option 1" but we can ofcourse add an additional option to the backend.

edit file: administrator/components/com_jem/models/forms/settings.xml
look for:
Code:
<field name="showdetails" type="list" label="COM_JEM_SHOW_EVENT" description="COM_JEM_SHOW_EVENT_DESC" class="inputbox" size="1" default="1" required="false" > <option value="0">COM_JEM_EVENT_OFF</option> <option value="1">COM_JEM_LINK_ON_TITLE</option> </field>

change it to:
Code:
<field name="showdetails" type="list" label="COM_JEM_SHOW_EVENT" description="COM_JEM_SHOW_EVENT_DESC" class="inputbox" size="1" default="1" required="false" > <option value="0">COM_JEM_EVENT_OFF</option> <option value="1">COM_JEM_LINK_ON_TITLE</option> <option value="2">***language string***</option> </field>

save the file and add the language string to the language file.
at this point you'll have an additional option to select in the backend and in that case we can adapt the default_events_table.php file a bit more.
Code:
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 2)) : ?> <?php if ($this->escape($row->introtext) != "" ) { ?> <td class="jem_title"> <a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url"> <span itemprop="name"><?php echo $this->escape($row->title); ?></span> </a> </td> <?php } else { ?> <td class="jem_title" itemprop="name"> <?php echo $this->escape($row->title); ?> </td> <?php } ?> <?php endif; ?> <?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : ?> <td class="jem_title"> <a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url"> <span itemprop="name"><?php echo $this->escape($row->title); ?></span> </a> </td> <?php endif; ?> <?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 0)) : ?> <td class="jem_title" itemprop="name"> <?php echo $this->escape($row->title); ?> </td> <?php endif; ?>
The following user(s) said Thank You: myrtus

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

Re: Link zur Detailseite

10 years 3 weeks ago - 10 years 3 weeks ago
#16004
Thanks for your quick reply.
IT WORKS! :woohoo:
Thank you very very much for the code.
Last edit: 10 years 3 weeks ago by myrtus.

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

Re: Link zur Detailseite

10 years 3 weeks ago
#16006
@myrtus

just to note: be aware that if you go for the additional option then you've to change all pages.

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

Time to create page: 0.668 seconds