Need of placing code in head tag

More
4 years 6 months ago #8116 by ahkpixel
ahkpixel created the topic: Need of placing code in head tag
I need to place some code rel="alternate" hreflang="x" in HTML link element in header.
Please advice where I could find this.
Needs to done for language pages.
Thanks

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

More
4 years 6 months ago #8117 by artur
artur replied the topic: Need of placing code in head tag
Hello,
You can add code in module (Custom HTML module)
or you can add your code directly in template :

/templates/jm-template/tpl/
/templates/jm-template/tpl/blocks/ -> in this case 'header.php'

Best Regards.

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

More
4 years 6 months ago #8120 by ahkpixel
ahkpixel replied the topic: Need of placing code in head tag
this mean that the following code to be added to header.php
for each of the languages.
<l-ink rel="alternate" hreflang="sv" href=" sv.example.com/ " />
<l-ink rel="alternate" hreflang="de" href=" de.example.com/ " />
<l-ink rel="alternate" hreflang="da" href=" da.example.com/ " />
<l-ink rel="alternate" hreflang="nl" href=" nl.example.com/ " />
where within the code will have to be placed?

defined('_JEXEC') or die;

//get template width type
$templatewidthtype = $this->params->get('templateWidthType', '0');
$fluid = ($templatewidthtype != '0') ? '-fluid' : '';

?>

<?php if ($this->countModules('header') or $this->countModules('header-bg')) : ?>
<section id="jm-header">
<?php if ($this->countModules('header-bg')) : ?>
<div id="jm-header-bg">
<jdoc:include type="modules" name="header-bg" style="jmmodule"/>
</div>
<?php endif; ?>
<?php if ($this->countModules('header')) : ?>
<div id="jm-header-content">
<div id="jm-header-in" class="container<?php echo $fluid ?>">
<div id="jm-header-space" class="clearfix">
<jdoc:include type="modules" name="header" style="jmmodule"/>
</div>
</div>
</div>
<?php endif; ?>
</section>
<?php endif; ?>

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

More
4 years 6 months ago #8124 by artur
artur replied the topic: Need of placing code in head tag
Hello,
Probably you mean 'head' not 'header' ?
In this case you should add code in 'tpl/blocks/head.php' at the bottom.

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

Time to create page: 0.237 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.