CoreFiles by mySites.guru
default_links.php42 lines, 1,022 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
d0efef5a07950972c7dc704c84aac355
sha1
fb2efd8f8b24909bb2b81e3afe75022a4f5a057b
sha256
f8c7d545cf91c3dbb4ff7cfdbffccf4fd0bbfe389b08e1945c5012c2076b6a7d
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_contact
 *
 * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @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 2 releases, Joomla 4.0.0-beta6 to 4.0.0-beta7. See them all, or every version of this file.