Content Translation - Landesflagge oben?
Eingetragen von desputin (100)
am 26.02.2010 - 15:27 Uhr in
am 26.02.2010 - 15:27 Uhr in
Hallo Ihr,
ich habe das Modul "Content translation" installiert. Man kann damit auf einen englisch-oder deutsch-Flagge klicken und der Inhalt der Seite erscheint in der anderen sprache. Leider ist die Flagge unten auf der Seite und ich will sie oben haben.
Unter "Content Types" - "Page" - "Manage Fields" habe ich nun versucht, die Reihenfolge zu ändern und habe dort "Language" und "Translation Settings" ganz nach oben gezogen, allerdings ohne Erfolg. Die Flagge ist immer noch unten.
Wißt Ihr da eventuell Bescheid?
Viele Grüße Christopher
- Anmelden oder Registrieren um Kommentare zu schreiben
Vielleicht kann das das
am 26.02.2010 - 15:44 Uhr
Vielleicht kann das das Eldorado Superfly Modul.
Wenn nicht schau mal hier: http://drupal.org/node/641194.
» forward-media.de Drupal Entwicklung | Drupal Tutorials
Ok danke...
am 26.02.2010 - 16:34 Uhr
Kannst Du hier erkennen, was wohl der Schalter für die Sprache, bzw. die Flagge ist?
<?php
// $Id: node.tpl.php,v 1.1.2.1 2009/07/07 00:04:13 agileware Exp $
/**
* @file node.tpl.php
*
* Theme implementation to display a node.
*
* Available variables:
* - $title: the (sanitized) title of the node.
* - $content: Node body or teaser depending on $teaser flag.
* - $picture: The authors picture of the node output from
* theme_user_picture().
* - $date: Formatted creation date (use $created to reformat with
* format_date()).
* - $links: Themed links like "Read more", "Add new comment", etc. output
* from theme_links().
* - $name: Themed username of node author output from theme_user().
* - $node_url: Direct url of the current node.
* - $terms: the themed list of taxonomy term links output from theme_links().
* - $submitted: themed submission information output from
* theme_node_submitted().
*
* Other variables:
* - $node: Full node object. Contains data that may not be safe.
* - $type: Node type, i.e. story, page, blog, etc.
* - $comment_count: Number of comments attached to the node.
* - $uid: User ID of the node author.
* - $created: Time the node was published formatted in Unix timestamp.
* - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
* teaser listings.
* - $id: Position of the node. Increments each time it's output.
*
* Node status variables:
* - $teaser: Flag for the teaser state.
* - $page: Flag for the full page state.
* - $promote: Flag for front page promotion state.
* - $sticky: Flags for sticky post setting.
* - $status: Flag for published status.
* - $comment: State of comment settings for the node.
* - $readmore: Flags true if the teaser content of the node cannot hold the
* main body content.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
*
* @see template_preprocess()
* @see template_preprocess_node()
*/
?>
<div id="node-<?php echo $node->nid; ?>" class="node<?php if ($sticky) echo ' sticky'; ?><?php if (!$status) echo ' node-unpublished'; ?> clear-block">
<?php echo $picture; ?>
<?php if ($teaser): ?>
<h2><a href="<?php echo $node_url; ?>" title="<?php echo $title; ?>"><?php echo $title; ?></a></h2>
<?php endif; ?>
<div class="meta">
<?php if ($submitted): ?>
<div class="submitted">
<?php echo $submitted; ?>
</div>
<?php endif; ?>
<?php if ($terms): ?>
<div class="terms terms-inline">
<?php echo $terms; ?>
</div>
<?php endif;?>
</div>
<div class="content">
<?php echo $content; ?>
</div>
<div class="meta">
<?php if ($links): ?>
<div class="links">
<?php echo $links; ?>
</div>
<?php endif; ?>
</div>
</div>
Ich vermute es wird über
am 26.02.2010 - 17:21 Uhr
Ich vermute es wird über
<?php if ($links): ?>
<div class="links">
<?php echo $links; ?>
</div>
<?php endif; ?>
ausgegeben.
» forward-media.de Drupal Entwicklung | Drupal Tutorials
Hm...
am 26.02.2010 - 17:52 Uhr
Ich bin nicht so gut mit php... was heißt das dann bzw. was genau muß denn dann im Quelltext wo hin verschoben werden?
Ich riskier es mal und sage
am 26.02.2010 - 17:56 Uhr
es kommt von hier:
<div class="content">
<?php echo $content; ?>
</div>
Aber um genaueres zu sagen gib mal hinter
<?php if ($links): ?>
<div class="links">
<?php echo $links; ?>
</div>
<?php endif; ?>
folgendes ein:
<pre><?php print_r($node);?></pre>
Und poste das Ergebnis der Ausgabe. Dort werden dann alle Variablen und Inhalte in deinem node angezeigt.
Ok, heute bin ich wieder bei der Arbeit....
am 02.03.2010 - 14:57 Uhr
Ok, also dann sieht das so aus:
Home
* View
* Edit
* Track
* Translate
English1
Submitted by Superroot on Fri, 12/18/2009 - 14:46
This page is Written in English This page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in English
* Deutsch Deutsch <strong> // hier sieht man das Flaggensymbol</strong>
stdClass Object
(
[nid] => 12
[type] => page
[language] => en
[uid] => 3
[status] => 1
[created] => 1261143960
[changed] => 1261144368
[comment] => 0
[promote] => 0
[moderate] => 0
[sticky] => 0
[tnid] => 11
[translate] => 0
[vid] => 12
[revision_uid] => 3
[title] => English1
[body] =>
Submitted by Superroot on Fri, 12/18/2009 - 14:46
This page is Written in English This page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in English
* Deutsch Deutsch <strong> // hier sieht man das Flaggensymbol</strong>
[log] =>
[revision_timestamp] => 1261144368
[format] => 2
[name] => Superroot
[picture] =>
[data] => a:1:{s:13:"form_build_id";s:37:"form-055c9fc6a2b969695b0a7f14601e695f";}
[last_comment_timestamp] => 1261143960
[last_comment_name] =>
[comment_count] => 0
[taxonomy] => Array
(
)
[files] => Array
(
)
[build_mode] => 0
[readmore] => 1
[content] => Array
(
[esf_picture] => Array
(
[#value] =>
[#weight] => -5
[#title] =>
[#description] =>
[#printed] => 1
)
[esf_submitted] => Array
(
[#value] => Submitted by Superroot on Fri, 12/18/2009 - 14:46
[#weight] => -5
[#title] =>
[#description] =>
[#printed] => 1
)
[#content_extra_fields] => Array
(
[title] => Array
(
[label] => Title
[description] => Node module form.
[weight] => -2
)
[body_field] => Array
(
[label] => Body
[description] => Node module form.
[weight] => 0
[view] => body
)
[revision_information] => Array
(
[label] => Revision information
[description] => Node module form.
[weight] => 1
)
[comment_settings] => Array
(
[label] => Comment settings
[description] => Comment module form.
[weight] => 3
)
[language] => Array
(
[label] => Language
[description] => Locale module form.
[weight] => -4
)
[translation] => Array
(
[label] => Translation settings
[description] => Translation module form.
[weight] => -3
)
[menu] => Array
(
[label] => Menu settings
[description] => Menu module form.
[weight] => -1
)
[taxonomy] => Array
(
[label] => Taxonomy
[description] => Taxonomy module form.
[weight] => -3
)
[attachments] => Array
(
[label] => File attachments
[description] => Upload module form.
[weight] => 2
[view] => files
)
[esf_submitted] => Array
(
[label] => Submitted by
[description] => Author information and timestamp for the node.
[weight] => -5
[configure] => Configure
)
[esf_links] => Array
(
[label] => Node links
[description] => Links displayed when a node is viewed.
[weight] => 4
[configure] => Configure
)
)
[body] => Array
(
[#weight] => 0
[#value] =>
This page is Written in English This page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in English
[#title] =>
[#description] =>
[#printed] => 1
)
[#pre_render] => Array
(
[0] => content_alter_extra_weights
)
[esf_links] => Array
(
[#value] =>
* Deutsch Deutsch <strong>// hier sieht man das Flaggensymbol</strong>
[#weight] => 4
[#title] =>
[#description] =>
[#printed] => 1
)
[#title] =>
[#description] =>
[#children] =>
Submitted by Superroot on Fri, 12/18/2009 - 14:46
This page is Written in English This page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in EnglishThis page is Written in English
* Deutsch Deutsch <strong>// hier sieht man das Flaggensymbol</strong>
[#printed] => 1
)
[links] => Array
(
[node_translation_de] => Array
(
[title] => Deutsch Deutsch <strong>// hier sieht man das Flaggensymbol</strong>
[href] => node/11
[language] => stdClass Object
(
[language] => de
[name] => German
[native] => Deutsch
[direction] => 0
[enabled] => 1
[plurals] => 2
[formula] => ($n!=1)
[domain] =>
[prefix] => de
[weight] => 0
[javascript] =>
)
[attributes] => Array
(
[title] => Deutsch1
[class] => translation-link
)
[html] => 1
)
)
)
Ich revidiere meine Aussage
am 02.03.2010 - 18:37 Uhr
derjochenmeyer hat Recht. Es kommt aus $links.
Spasseshalber könntest du die mal auskommentieren, dann dürfte die Flagge nicht mehr erscheinen.
<?php if ($links): ?>
<div class="links">
<?php //echo $links; ?>
</div>
<?php endif; ?>
Noch ein kurzer Einwurf:
Unter "Content Types" - "Page" - "Manage Fields"
Hier änderst du nur die Reihenfolge von Feldern für die Eingabe. Das hat erstmal nichts mit dem Erscheinungsbild an sich zu tun.
Ich kenne das Modul nicht. Aber ich würde mal raten, das du es noch irgendwo einstellen kannst. Wahrscheinlich musst du eine Zahl >0 oder <0 eingeben können.