AffordableDomainsCanada Posted February 2, 2017 Share Posted February 2, 2017 (edited) okay so I want to add font awesome images before certain pages so I want to use something like such but I know I need some help with the calling of the pages.. {if $page eq "supporttickets"}<i class="fa fa-ticket fa-3x" aria-hidden="true"></i> {/elseif $page eq "clientarea"}} <i class="fa fa-home fa-3x" aria-hidden="true"></i> {/else} {/if} {$title}{if $desc} <small>{$desc}</small>{/if}</h1> {if $showbreadcrumb}{include file="$template/includes/breadcrumb.tpl"}{/if} </div> Edited February 2, 2017 by AffordableDomainsCanada 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 2, 2017 Share Posted February 2, 2017 just replace $page with $filename and you're good to go.. {if $filename eq "supporttickets"}<i class="fa fa-ticket fa-3x" aria-hidden="true"></i> {elseif $filename eq "clientarea"}<i class="fa fa-home fa-3x" aria-hidden="true"></i> {/if} 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted February 2, 2017 Author Share Posted February 2, 2017 THANK YOU! I knew I was close, I searched and searched these forums looking for that and wasnt 100% sure what I was looking for.. Thank you one again! 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted February 2, 2017 Author Share Posted February 2, 2017 This is working perfectly, except for the client area, I have {elseif $filename eq "clientarea"}<i class="fa fa-home" aria-hidden="true"></i> but the home icon is also showing on the Edit client details page, so I created, {elseif $filename eq "details"}<i class="fa fa-user" aria-hidden="true"></i> but that doesnt work, how can I call an FA image to the details page ? /clientarea.php?action=details 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 2, 2017 Share Posted February 2, 2017 I thought this might be the follow-up question. as well as using $filename (as above) to cover all uses of that page, if you want to be more specific, you can access the template filename too using $templatefile - in this case 'clientareadetails'. {elseif $templatefile eq "clientareadetails"}<i class="fa fa-user" aria-hidden="true"></i> if you're going to do this for multiple pages in the clientarea, then I suggest you change the $filename="clientarea' line to... {elseif $templatefile eq "clientareahome"}<i class="fa fa-home" aria-hidden="true"></i> - otherwise it would overrule anything beneath it. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted February 2, 2017 Author Share Posted February 2, 2017 Thank you, thank you! 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted February 2, 2017 Author Share Posted February 2, 2017 I have another question.. so, if my page is /serverstatus.php, I use: {elseif $filename eq "serverstatus"}<i class="fa fa-server" aria-hidden="true"></i> and if my page is /clientarea.php?action=details I use: {elseif $templatefile eq "clientareadetails"}<i class="fa fa-id-card-o" aria-hidden="true"></i> How would I code this page ? /index.php?m=forum Ive tried several different ways and no luck. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 2, 2017 Share Posted February 2, 2017 I had a feeling we would get to this... so you know about $filename for files, you know $templatefile for templates - now we reach the third option - the GET variable... which you can use to access additional variables passed in the URL. {elseif $filename eq "index" and $smarty.get.m eq "forum"}<i class="fa fa-comment-o" aria-hidden="true"></i> you might not need the $filename eq "index" part, but that depends on the forum addon you're using and whether it can be called from pages other than index.php. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted February 2, 2017 Author Share Posted February 2, 2017 I cant get this to work for some odd reason.. {elseif $templatefile eq "clientareaservices"}<i class="fa fa-money" aria-hidden="true"></i> 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 2, 2017 Share Posted February 2, 2017 isn't the template called clientareaproducts ? {elseif $templatefile eq "clientareaproducts"}<i class="fa fa-money" aria-hidden="true"></i> 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.