Elxis CMS Forum

Support => Technical support => Topic started by: bully on May 29, 2019, 15:57:27

Title: elxis 5, template five; adding logo fails
Post 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
Title: Re: elxis 5, template five; adding logo fails
Post by: bully on May 30, 2019, 11:15:54
really nobody knows how to?    >:(
Title: Re: elxis 5, template five; adding logo fails
Post by: Blacksoll on May 30, 2019, 13:37:56
Open index.php of template, add after line 49
Code: [Select]
<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 !
Title: Re: elxis 5, template five; adding logo fails
Post by: bully on May 30, 2019, 13:44:41
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
Title: Re: elxis 5, template five; adding logo fails
Post by: datahell on May 30, 2019, 23:00:33
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.
Title: Re: elxis 5, template five; adding logo fails
Post by: bully on June 06, 2019, 04:15:11
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,
Code: [Select]
<img src="<?php echo $elxis->secureBase(); ?>/templates/five/images/logo.png" alt="<?php echo $elxis->getConfig('SITENAME'); ?>" />


but when try it to insert here




Code: [Select]
<?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'

Title: Re: elxis 5, template five; adding logo fails
Post by: webgift on June 06, 2019, 14:44:32

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!
Title: Re: elxis 5, template five; adding logo fails
Post by: bully on June 06, 2019, 17:20:34
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