Jump to content

Can't add image/icon to template


yggdrasil

Recommended Posts

Hi there friends.

 

I know this may sound dumb but I cannot seem to figure out how to do something as simple as adding an image next to a title in the templates.

 

For some reason almost all templates are like this:

 

{include file="$template/pageheader.tpl" title=$LANG.knowledgebasetitle}

 

Which means I cannot do anything with the title text here.

 

For some reason, WHMCS decided to put the title in the same variable which includes the main template.

 

I tried separating them like this:

{include file="$template/pageheader.tpl"}

my image code here.

{$LANG.knowledgebasetitle}

 

Works but loses formatting and its then just a simple text.

 

This does not work:

{title=$LANG.knowledgebasetitle}

 

Is there absolutely no way to have an image next to the title?

 

This of course does not work:

{include file="$template/pageheader.tpl" <img src="myimage.png""> title=$LANG.knowledgebasetitle}

 

Can someone tell me if there is a smarty tag that would work here or at least how to separate the variables in order so I can sneak in a HTML image tag between then"?

Link to comment
Share on other sites

This of course works:

 

{include file="$template/pageheader.tpl"}

 

IMAGE HTML code

 

<h1>{$LANG.knowledgebasetitle}</h1>

 

But this is then actually inserting the title outside the header page. I just need a small icon next to the title in the headers, but it seems WHMCS decided to make a whole template called:

pageheader.tpl which is then inserted into pages.

 

The problem?

 

That you now have the same header for ALL templates. I could of course remove it and do the code manual per template, but I was trying to simplify things.

Link to comment
Share on other sites

An icon. That is all. What I did now, is just take the code in the pageheader.tpl and insert it manually on each template and so I'm basically not using the pageheader.tpl at all anymore.

 

But if you check that template, it actually gets the title from each template. It would be better if I could just pass from each template the IMG tag code to the pageheader.tpl, this way I can keep using that template and maintain separated code clean and nice as it works out of the box.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated