Skip to content

Commit

Permalink
correcao link de arquivos de todos os idiomas #tk72
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon authored and Gustavo Fonseca committed Feb 26, 2019
1 parent aa5ddc8 commit de5c9d9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions application/views/pages/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,20 @@

// Verify if the page is of the type 'pageModel-linkExternal.php' or 'pageModel-linkToDocument.php'
if ($subpage['template'] == 'pageModel-linkExternal.php') {
$link = $subpage['acf']['link_pt'];

$link = $subpage['acf']['link_'.$language];

} else if ($subpage['template'] == 'pageModel-linkToDocument.php') {
$link = $subpage['acf']['document_pt'];

$link = $subpage['acf']['document_'.$language];


} else {
// If the language is Portuguese it is necessary to concatenate the cookie language value.
$scielo_url = ($language == SCIELO_LANG) ? base_url($language . '/') : base_url();
$link = str_replace(WORDPRESS_URL, $scielo_url, $subpage['link']);
}

?>
<li>
<a href="<?= $link ?>">
Expand Down

0 comments on commit de5c9d9

Please sign in to comment.