CoreFiles by mySites.guru
default_links.php42 lines, 1,035 bytes, from Joomla_4.0.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta
md5
c60476ba9af8be705509b12a482e446e
sha1
9ded8981f523c56a3df1178a4066a5d7ea8feaf0
sha256
a2e038f85dad39673c71ac74ed60aa68834fb1c2c953f59f310a6a801f1fe40c
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<?php echo '<h3>' . Text::_('COM_CONTACT_LINKS') . '</h3>'; ?>

<div class="com-contact__links contact-links">
	<ul class="nav flex-column">
		<?php
		// Letters 'a' to 'e'
		foreach (range('a', 'e') as $char) :
			$link = $this->item->params->get('link' . $char);
			$label = $this->item->params->get('link' . $char . '_name');

			if (!$link) :
				continue;
			endif;

			// Add 'http://' if not present
			$link = (0 === strpos($link, 'http')) ? $link : 'http://' . $link;

			// If no label is present, take the link
			$label = $label ?: $link;
			?>
			<li class="nav-item">
				<a class="nav-link" href="<?php echo $link; ?>" itemprop="url">
					<?php echo $label; ?>
				</a>
			</li>
		<?php endforeach; ?>
	</ul>
</div>

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.