fbpx

Trick or Treat - 30% OFF - Coupon Code: SCARY20 Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: Newest article - date

Newest article - date 4 months 2 weeks ago #22941

  • marvays
  • marvays's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Karma: 0
Hi . I am using module with newest articles, and use class "view-builder".
How i can:
  1. translate "Read more"
  2. show date with create article

Link here: zus-kostelec.platimmalo.cz/

Please, I need to act fast. THANK YOU FOR UNDERSTANDING.
The administrator has disabled public write access.

Newest article - date 4 months 2 weeks ago #22961

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 609
  • Karma: 108
Hi,

1. This tutorial explains how you can use language overrides docs.joomdev.com/article/how-to-debug-la...-language-constants/
2. Not sure if it's a setting in the module but if it's not. You are going to have to customize the module layout to fit your needs. Documentation on Joomla overrides docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Newest article - date 4 months 2 weeks ago #22965

  • marvays
  • marvays's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Karma: 0
Thx.
1. try it
2. Module havent any setup. In joomla it is standard module for article. Changes are only in your template. I try override it in template. How code show date of article? Do you know?
Last Edit: 4 months 2 weeks ago by marvays.
The administrator has disabled public write access.

Newest article - date 4 months 2 weeks ago #22978

  • marvays
  • marvays's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Karma: 0
I have problem with create date.
I am adding:
<dd class="create">
<i class="far fa-calendar-plus"></i>
<time datetime="<?php echo JHtml::_('date', $item->created, 'c'); ?>" itemprop="dateCreated">
<span><?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC3'))); ?></span>
</time>
</dd>
But dont work. See: zus-kostelec.platimmalo.cz/
Last Edit: 4 months 2 weeks ago by marvays.
The administrator has disabled public write access.

Newest article - date 4 months 2 weeks ago #22981

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 609
  • Karma: 108
Alright...

You added in the correct place. That's correct... 2 things now.
1. Translation not working. Go ahead and add a language override for this in the backend if needed be: COM_CONTENT_CREATED_DATE_ON so the translation works.
2. Make sure $item is available in the loop where you added your code.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Newest article - date 4 months 2 weeks ago #22985

  • marvays
  • marvays's Avatar
  • Offline
  • Senior Member
  • Posts: 41
  • Karma: 0
Hi.
1. Translation must wor, because on another site works fine.
2. I am not undertund you :(

All the code:
<?php
/**
 * @package   Astroid Framework
 * @author    JoomDev https://www.joomdev.com
 * @copyright Copyright (C) 2009 - 2019 JoomDev.
 * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
 */

defined('_JEXEC') or die;
?>
<div class="items-row row-0 row clearfix view-builder">
<?php foreach ($list as $item) : $image = json_decode($item->images); ?>
	<div class="col-lg-4 p-3">
		<div class="card h-100">
			<article class="item column-1" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
				<div class="pull-none item-image">
				<a href="<?php echo $item->link; ?>"><img src="<?php echo $image->image_intro ?>" alt="" itemprop="thumbnailUrl"></a>
				</div>
				<div class="card-body">
					<div class="item-title">

						<div class="page-header">
							<h2 itemprop="name">
								<a href="<?php echo $item->link; ?>" itemprop="url">
									<?php echo $item->title; ?>
								</a>
							</h2>
						</div>
					</div>
					<dl class="article-info muted">
						<dd class="category-name">
							<i class="far fa-folder"></i>
							<a href="<?php echo JRoute::_("index.php?option=com_content&view=category&layout=$item->category_title&id=$item->catid"); ?>" itemprop="genre"><?php echo $item->category_title; ?>	</a> 
						</dd>
						<dd class="create">
							<i class="far fa-calendar-plus"></i>
							<time datetime="<?php echo JHtml::_('date', $item->created, 'c'); ?>" itemprop="dateCreated">
							<span><?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC3'))); ?></span>
							</time>
						</dd>
					</dl>
					<?php echo $item->introtext; ?>
					<div class="readmore">
						<a class="btn btn-primary readmore-btn" href="<?php echo $item->link; ?>" itemprop="url" aria-label="Read more: <?php echo $item->title; ?>">
							Číst dál... </a>
					</div>
				</div>
			</article>
		</div>
	</div>
	<?php endforeach; ?>
</div>
The administrator has disabled public write access.

Newest article - date 4 months 1 week ago #23029

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4151
  • Thank you received: 609
  • Karma: 108
Hi,

I don't know what you are doing wrong but something. I can see the date time is showing up fine in the HTML. Even though it's not being displayed on the screen.

This is really custom coding and outside the support scope, I wish I could continue to help here.

Thanks,
Chetan
Attachments:
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.391 seconds