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

CUSTOM FIELDS to show in Venue and Venues

Re: CUSTOM FIELDS to show in Venue and Venues

9 years 3 hours ago
#23029
ja genau, werden nicht abgefragt … ich dachte, ich könnte einfach den zugehörigen php-code (siehe oben) einfügen … reicht aber nicht … irgendwas fehlt da noch …

lieben dank dir!!!

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

Re: CUSTOM FIELDS to show in Venue and Venues

9 years 3 hours ago
#23030
eben irgendwie müsste da in models/venues.php in der Query custom1...etc. abgefragt werden, wie es auf eine andere Art in models/venue.php gemacht wird!

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

Re: CUSTOM FIELDS to show in Venue and Venues

8 years 11 months ago
#23044
Habe gerade keine Zeit es auszuprobieren, aber ich hatte das gleiche Thema mit den Modulen und auch hinbekommen, siehe " Custom Fields in Modules ".

Die Lösung ist jedoch nur mit Veränderungen in den JEM Core Dateien möglich, d.h. es braucht eine gute Backup Strategie, dass nicht bei jedem Update alles wieder neu gemacht werden muss.

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

Re: CUSTOM FIELDS to show in Venue and Venues

8 years 11 months ago
#23051
ja, aber bei den Modulen ist es etwas anders … leider hab ich die Lösung immer noch nicht …

derzeit habe ich folgende Veränderungen gemacht:

in com/jem/views/models/venues.php eingefügt:

$query->select(array('l.custom1 AS venue1', 'l.custom2 AS venue2', 'l.custom3 AS venue3', 'l.custom4 AS venue4', 'l.custom5 AS venue5', 'l.custom6 AS venue6', 'l.custom7 AS venue7', 'l.custom8 AS venue8', 'l.custom9 AS venue9', 'l.custom10 AS venue10',
'l.id AS locid', 'l.locimage', 'l.locdescription', 'l.url', 'l.venue',
'l.street', 'l.city', 'l.country', 'l.postalCode', 'l.state',
'l.map', 'l.latitude', 'l.longitude', 'l.published'));



in com/jem/views/venues/tmpl/default.php eingefügt:

<!--EINFÜGUNG VENUE_CUSTOM_FIELD-->

<?php
for ($cr = 1; $cr <= 10; $cr++) {
$currentRow = $this->venue->{'custom'.$cr};
if (preg_match('%^http(s)?://%', $currentRow)) {
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>';
}
if ($currentRow) {
?>
<dl class="location">

<dt class="custom<?php echo $cr; ?>"><?php echo JText::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr).':'; ?></dt>
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd> </dl>

<?php
}
}
?>
<!--EINFÜGUNG VENUE_CUSTOM_FIELD ENDE-->


beides hat aber noch nicht das gewünschte Ergebnis …

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

Re: CUSTOM FIELDS to show in Venue and Venues

8 years 11 months ago
#23052
Probier mal in jem/views/models/venues.php
Code:
$query->select(array('l.custom1', 'l.custom2', 'l.custom3', 'l.custom4', 'l.custom5', 'l.custom6', 'l.custom7', 'l.custom8', 'l.custom9', 'l.custom10', 'l.id AS locid', 'l.locimage', 'l.locdescription', 'l.url', 'l.venue', 'l.street', 'l.city', 'l.country', 'l.postalCode', 'l.state', 'l.map', 'l.latitude', 'l.longitude', 'l.published'));
und dann arbeite nicht an den original Template Dateien ("jem/views/venues/tmpl/default.php"), sondern mach ein Template Override (in der Administration unter "Erweiterungen" --> "Templates", gehst du bei deinem Template auf "Details und Dateien" und machst unter "Overrides erstellen" ein Override von "com_jem" --> "venues".)
Und dann gehst du also zu "default.php" in templates/DEIN-TEMPLATE/html/com_jem/venues/default.php

Da solltest du mit
Code:
<?php echo $this->escape($row->custom1); ?> <?php echo $this->escape($row->custom2); ?> …
die Felder abrufen können …
The following user(s) said Thank You: jojo12

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

Re: CUSTOM FIELDS to show in Venue and Venues

8 years 11 months ago
#23053
Oder zum Abrufen der Custom Fields in templates/DEIN-TEMPLATE/html/com_jem/venues/default.php besser das hier nehmen:
Code:
<?php for ($cr = 1; $cr <= 10; $cr++) { $currentRow = $this->escape($row->{'custom'.$cr}); if (preg_match('%^http(s)?://%', $currentRow)) { $currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>'; } if ($currentRow) { ?> <dt class="custom<?php echo $cr; ?>"><?php echo JText::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr).':'; ?></dt> <dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd> <?php } } ?>
Dann passt es zum Rest …
The following user(s) said Thank You: jojo12, eo7y

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

Time to create page: 0.455 seconds