yggdrasil Posted August 1, 2014 Share Posted August 1, 2014 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"? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 1, 2014 Author Share Posted August 1, 2014 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. 0 Quote Link to comment Share on other sites More sharing options...
kargh Posted August 1, 2014 Share Posted August 1, 2014 Where are you trying to add an at, specifically? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 2, 2014 Author Share Posted August 2, 2014 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. 0 Quote Link to comment Share on other sites More sharing options...
kargh Posted August 2, 2014 Share Posted August 2, 2014 Is it a different image for each page or the same image on all? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.