help to better help you:

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

Venue Screen: How to disable the display of zip, state...?

Venue Screen: How to disable the display of zip, state...?

7 years 11 months ago
#23187
Dear all,

How to disable the display of zip, state and country in the Venue info screen?

Thanks for any kind of help?
JMY(晉明夷)
mfYoga.org -- Mindfulness Yoga Association 靜觀瑜伽協會
YogaJM.com -- YogaJM 晉明瑜伽
jmy89.me -- JMY 晉明日誌
jm3ime.com -- JinMing 3-Key Chinese Input Method 晉明三鍵輸入法

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

Re: Venue Screen: How to disable the display of zip, state...?

7 years 11 months ago
#23195
Hello JMY,

it seems to me that all these are in a <dl> and each <dt> and <dd> has an appropriate class like "venue_postalCode", "venue_state" or "venue_country".
With that it should be possible to override the CSS and define those <dt> and <dd> of such classes that you do not want to show with "display: none;".

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

Re: Venue Screen: How to disable the display of zip, state...?

7 years 11 months ago - 7 years 11 months ago
#23197
hhtmp88 wrote: Dear all,

How to disable the display of zip, state and country in the Venue info screen?

Thanks for any kind of help?
IMPORTANT! -- BEFORE doing anything to any of your code, make sure you have a COMPLETE copy of all your ORIGINAL code safely set aside in case you break something.

I am not an expert so I may not be the best one to answer this, but when I'm customizing someone else's code and I'm not absolutely sure I want to completely delete parts of it, my solution is to "comment out" the sections I am trying to hide using "<!--" at the beginning of what I'm thinking of deleting and "-->" at the end of that section of code. (Note - Placement of these can sometimes be a little tricky when you are using them within PHP code so be careful.)

This way I can check how the removal will effect my page appearance as well as how removing it might affect other parts of the code.

Once I've tested all my modifications and know it is OK, I then I totally remove all the sections I've commented out.

In the example below I have "commented out" the Postal Code & City so they will not appear in the Venue details listed at the bottom of my event. (This is just an example. I am not hiding this information on the actual page.)

Also, once you are satisfied with all your changes, keep a separate copy of all your changed files. Nothing worse than having to start over from scratch if there is ever an issue with your customized site. Backup, backup, backuuuuuuuuuup!!!

Code:
<dl class="location"> <dt class="venue"><?php echo JText::_('COM_JEM_LOCATION'); ?>:</dt> <dd class="venue"> <?php echo '<a href="' . JRoute::_(JemHelperRoute::getVenueRoute($this->item->venueslug)) . '">' . $this->escape($this->item->venue) . '</a>'; if (!empty($this->item->url)) : echo '&nbsp;-&nbsp;<a target="_blank" href="' . $this->item->url . '">' . JText::_('COM_JEM_WEBSITE') . '</a>'; endif; ?> </dd> </dl> <?php if ($params->get('event_show_detailsadress', '1')) : ?> <dl class="location floattext" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <?php if ($this->item->street) : ?> <dt class="venue_street"><?php echo JText::_('COM_JEM_STREET'); ?>:</dt> <dd class="venue_street" itemprop="streetAddress"> <?php echo $this->escape($this->item->street); ?> </dd> <?php endif; ?> <!-- <?php if ($this->item->postalCode) : ?> <dt class="venue_postalCode"><?php echo JText::_('COM_JEM_ZIP'); ?>:</dt> <dd class="venue_postalCode" itemprop="postalCode"> <?php echo $this->escape($this->item->postalCode); ?> </dd> <?php endif; ?> --> <?php if ($this->item->city) : ?> <dt class="venue_city"><?php echo JText::_('COM_JEM_CITY'); ?>:</dt> <dd class="venue_city" itemprop="addressLocality"> <?php echo $this->escape($this->item->city);?> </dd> <?php endif; ?> <!-- <?php if ($this->item->state) : ?> <dt class="venue_state"><?php echo JText::_('COM_JEM_STATE'); ?>:</dt> <dd class="venue_state" itemprop="addressRegion"> <?php echo $this->escape($this->item->state); ?> </dd> <?php endif; ?> --> <?php if ($this->item->country) : ?> <dt class="venue_country"><?php echo JText::_('COM_JEM_COUNTRY'); ?>:</dt> <dd class="venue_country"> <?php echo $this->item->countryimg ? $this->item->countryimg : $this->item->country; ?> <meta itemprop="addressCountry" content="<?php echo $this->item->country; ?>" /> </dd> <?php endif; ?>
Last edit: 7 years 11 months ago by Wip.

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

Re: Venue Screen: How to disable the display of zip, state...?

7 years 11 months ago
#23198
Thanks Wip for your advice!

Hi Wolfgang!

Which file should I work on to do the overrides?

And can you give an example on exactly how to do it?
e.g. the override on "venue_state"

Thanks for any kind of help!
JMY(晉明夷)
mfYoga.org -- Mindfulness Yoga Association 靜觀瑜伽協會
YogaJM.com -- YogaJM 晉明瑜伽
jmy89.me -- JMY 晉明日誌
jm3ime.com -- JinMing 3-Key Chinese Input Method 晉明三鍵輸入法

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

Time to create page: 0.463 seconds