Jump to content

template/THEMENAME/includes/pageheader.tpl and FA


Recommended Posts

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 by AffordableDomainsCanada
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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'. :idea:

 

{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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :idea:

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