Fork me on GitHub

Help with code  Bottom

  • I'm gradually getting my head around Xanthia, I've got most of a new theme working. I've now got stuck on how to get a piece of code that works in AutoTheme working in my Xanthia theme.

    Code

    $currentlang = pnUserGetLang();
          include $themepath."lang/".$currentlang."/navbar.php";
          while (list ($key, $value) = each ($headernav))
          echo"<td align=\"center\" valign=\"top\" onclick=\"window.location.href='"
                .$value
                ."'\">  \n"      
              ."<a href=\""
              .$value
              ."\">"
              .$key
              ."</a></td> \n";


    That pulls links in the lang/eng/navbar.php into the theme.

    If someone could help me with making it work it would be a great help.

    Thanks for your time.
  • Quote

    that works in AutoTheme working in my Xanthia theme.


    Why are you doing it through PHP code when you could do it in the template?

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • It's in an AutoTheme I'm trying to convert to Xanthia. I've had a look and now I relaise I can use something like:

    Code

    <a href="<!--[pnml name="_TOPLINKURL1"]-->"><!--[pnml name="_TOPLINKNAME1"]-->


    Is that what you mean. I'm pretty much a dummy with this and it's just trial and error for me.

    Thanks for your time.
  • Yes, that's the way to do it....

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • One change i'd make (and have already to the themes that use that notation) is to add the URL directly into the template - there's no need for a URL to be set as a language define.

    -Mark

    --
    Visit My homepage and Zikula themes.

This list is based on users active over the last 60 minutes.