Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

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

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited February 2016

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

  • Options

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

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    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>

  • Options
    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? :-)

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop 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
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

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

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    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
  • Options
    R_JR_J Ex-Fanboy Munich Admin

    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.

  • Options
    x00x00 MVP
    edited February 2016

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

    grep is your friend.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    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.