Dynamic site title in footer!

pickadollpickadoll New
edited February 2016 in Vanilla 2.0 - 2.8

I want the footer link title to change depending on which site the theme is used on...
I've looked into the documentation, etc, but i just can't figure it out.
I guess the answer is pretty simple so i hope someone can tell me.
I know i can put {logo} there but i only want the title.

        <a href="{link path="/"}">WHAT DO I PUT HERE? :D</a>

Comments

  • edited February 2016

    You mean on which page of the forum or some other website that uses the theme ?

  • No. Just the title of the website, ex. "Super Forums". Instead of displaying the logo. :-)

  • edited February 2016

    What is the theme you are using?

    In the foot area just add {home_link} in the tpl where you want it to appear...

    or

    <a href="{link path="/"}"><span>SuperForums</span></a>

  • pickadollpickadoll New
    edited February 2016

    Oh, but that just displays "Home", i want it to be the name of the forum on each site.
    I guess I'm looking for some sort of short code that can give me the site title, like {logo} that gives me the url to the logo.
    I'm using a custom theme based on the default theme.
    Is it not as simple as i thought it would? :-)

  • phreakphreak MVP
    edited February 2016

    Hi @pickadoll,

    Did you try:
    <a href="<?php echo Url('/'); ?>"><?php echo Gdn_Theme::Logo(); ?></a>

    Nice greetz, phreak

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • As far as I know, you can't add php into the tpl but go ahead and try, worst thing that can happen is a 500 error ...

  • Ah, sorry. I use that in the default.master.php in my theme. But there it works.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • I guess what you are looking for is {$Title}.

    If you want to find out more about the available Smarty variables, open /library/vendors/Smarty-2.6.25/libs/Smarty.class.php, search for $debugging and set it to true.

    As always: debugging should never be done in productive systems.

  • x00x00 MVP
    edited February 2016

    You can just include {debug} in your template no need for modifying that file.

    grep is your friend.

  • By the way: if you use {link...}, doesn't it create a complete <a>...</a> tag so that you would have to pass the link text already in that function?

Sign In or Register to comment.