Elxis CMS Forum
Support => Technical support => Topic started by: bully on May 29, 2019, 15:57:27
-
hi you gurus,
<?php echo '<a href="/"><img src="/media/images/logo.png"/></a>';?> // could not load the image
This is currently a sub-domain and the image is searched in the main.
Anyone knows, how to write that correctly?
thx a lot
bully
-
really nobody knows how to? >:(
-
Open index.php of template, add after line 49
<img src="<?php echo $elxis->secureBase(); ?>/templates/five/images/logo.png" alt="<?php echo $elxis->getConfig('SITENAME'); ?>" />
Put your logo at folder images of template. Done !
-
Oh thx @ lot. That looks somehow really the lne, I was looking for. It's also working, confirmed
I also did try with that securebase .... but as blind in php ... no luck.
The line numbers, forget. The template is heavy modified , that they ain't resemble anything of the original
bully
-
Template Five has not been designed for an image logo but for text title/subtitle. If you display a logo there you should modify the CSS respectively and also take care of css media queries.
-
Hi thx, Datahell,
but I could not find another one template and so far, I came actually further alone, then I thought and I got even help. I was to exited with the line help, I got. The line works well,
<img src="<?php echo $elxis->secureBase(); ?>/templates/five/images/logo.png" alt="<?php echo $elxis->getConfig('SITENAME'); ?>" />
but when try it to insert here
<?php
if ($eDoc->countModules('top') > 0) {
echo '<div class="tpl5_toppos">'."\n";
$eDoc->modules('top');
echo "</div>\n";
echo '<div class="clear"></div>'."\n";
}
if ($tpl5->showColumn() == true) {
echo '<div class="tpl5_sidecol">'."\n";
xxxxxxxxxxxxxxxx
$tpl5->sideBlocks($eDoc);
echo "</div>\n";
echo '<div class="clear"></div>'."\n";
echo '<div class="tpl5_maincol">'."\n";
$eDoc->component();
echo "</div>\n";
} else {
$eDoc->component();
echo '<div class="clear"></div>'."\n";
}
if ($eDoc->countModules('bottom') > 0) {
echo '<div class="tpl5_pos_bottom">'."\n";
$eDoc->modules('bottom');
echo "</div>\n";
echo '<div class="clear"></div>'."\n";
}
?>
on position of xxxxxxxxxxxxxxxx, I just not get that. How the (data)hell
Again, the logo works, coming up well, BUT, I need it on position of xxxxxxxxxxxxxxxx.
Anyone can help me please?
thx @ lot
Bully aka 'php idiot'
-
You've tried to insert HTML code into PHP block or the $elxis variable have not been
declared. Please replace the XXXXXXXXX with the line as quoted you below:
echo '<img src="'.eFactory::getElxis()->secureBase().'/templates/five/images/logo.png" alt="'.eFactory::getElxis()->getConfig('SITENAME').'" />';
Hope it's OK!
-
thx @ lot,
as some replies above Reply #5 on: Today at 04:15:11 I was attempting., to get this in. whilst looking somehow correct, the links did create an extra empty menu item and raising a js error :(
without the link, yes all looking and working correct. I might let that one even away .. no really need, but nice touch
bully