no work encode
  • <a href="/{{$gimme->language->code}}/page/author/?name={{ $gimme->author->number|escape:'url':'utf-8' }}">{{ $gimme->author->name }}</a>

    Do I transfer object or string with  {{ $gimme->author->name }}? 

    if I transfer a string for encode url...

    {{php}}  
            
            $test = $this->get_template_vars('author_const'); 
            $test =  base64_encode($test);
            $this->assign('author_test', $test); 
          {{/php}}   


    the below code doesn't work 

    {{php}} 
          $test = $this->get_template_vars('author_64'); 
          $test = base64_decode($test);
          $this->assign('author_const', $test);
      {{/php}}
     {{ list_articles length="1" constraints="author is `$author_const`" ignore_issue="true" ignore_section="true" }}    
         I get a value from the url, decode it and transfer in author_const but it doesn't work
    {{ if $gimme->author->name == $author_const }}
  • 1 Comment sorted by
  • Vote Up0Vote Down Martin SaturkaMartin Saturka
    Posts: 40Member, Sourcefabric Team
    Generally, I would suggest to print out the variable that you are not sure about, like {{ $author_cons }}

    And if something strange there, I would do "var_dump($test);" inside a {{ php }} block (after taking that variable from templates).

    It would help both to you and to us when trying to help you.

    Post edited by Martin Saturka at 2012-01-30 07:04:36