Differences

This shows you the differences between two versions of the page.

english:technics:title-and-meta-tags [2012/02/25 10:22]
Knut Heermann (flip-flop)
english:technics:title-and-meta-tags [2018/06/03 18:09] (current)
Line 33: Line 33:
===== Default after installation: ===== ===== Default after installation: =====
-**Ausgabe im Browser-Title**+**Output in Browser Title**
{{:deutsch:technik:title_meta_tags_be_browser_title01_1.gif|}} {{:deutsch:technik:title_meta_tags_be_browser_title01_1.gif|}}
-**mit den Einstellungen in Seitenlayout:**+**with the settings in Page Layout:**
{{:deutsch:technik:title_meta_tags_be_layout01_1.gif|}} {{:deutsch:technik:title_meta_tags_be_layout01_1.gif|}}
-**und Vorlage:**+**and template:**
{{:deutsch:technik:title_meta_tags_be_vorlage01_1.gif|}} {{:deutsch:technik:title_meta_tags_be_vorlage01_1.gif|}}
Line 49: Line 49:
===== Entry in the category: ===== ===== Entry in the category: =====
-In **ADMIN -> Seitenstruktur -> Kategorie** Haben wir die Möglichkeit in die Felder "**Seitentitel**" und "**Beschreibung der Seitenebene**"  Einträge für den Browser-Titel und die "meta descriptions" vorzunehmen. +In **ADMIN -> site structure -> category** we can type in entries into the fields "**page title:**" for the browser title and "**category infotext:**"  for the "meta descriptions".
-Diese Einträge haben nur Gültigkeit, wenn die Artikel im Listenmodus arbeiten, also mehr als ein Artikel in der Kategorie vorhanden ist und die "**Anzahl an Top-Artikel**" entsprechend gesetzt ist.+  * <del>Diese Einträge haben nur Gültigkeit, wenn die Artikel im Listenmodus arbeiten, also mehr als ein Artikel in der Kategorie vorhanden ist und die "**Anzahl an Top-Artikel**" entsprechend gesetzt ist. \\ Diese Einträge würden die bisher vorgegebenen überschreiben, **wenn der User im FE in der Artikelübersicht steht**.</del> \\ r442: These entries are also written into the **<head>** area (e.g. double "meta description", "meta keywords").
-Diese Einträge würden die bisher vorgegebenen überschreiben, **wenn der User im FE in der Artikelübersicht steht**. +  * Or there are no entries in the template for "description" and/or "keywords". In this case, the entries of the category used. The "title" can be replaced with a [[english/technics/title-and-meta-tags#scriptpage_titledescriptionkeywords_from_category_into_the_head_area|small script]] //(see below)//.
 + 
 +\\
{{:deutsch:technik:title_meta_tags_be_seitenstruktur02_1.gif|}} {{:deutsch:technik:title_meta_tags_be_seitenstruktur02_1.gif|}}
-**Artikelzentrale:**+**Article center:**
{{:deutsch:technik:title_meta_tags_be_artikelzentrale02_1.gif|}} {{:deutsch:technik:title_meta_tags_be_artikelzentrale02_1.gif|}}
Line 63: Line 65:
<note> <note>
-**Die meta description aus der Kategorie überschreibt eine vielleicht vorhandene meta description in der Vorlage.**+**The meta description in this category may not be overrides an existing meta description in the template.** [[english/technics/title-and-meta-tags#scriptpage_titledescriptionkeywords_from_category_into_the_head_area|See Script]].
</note> </note>
-**Ergebnis im Browser:**+**Result in the browser:**
{{:deutsch:technik:title_meta_tags_be_browser_title02_1.gif|}} {{:deutsch:technik:title_meta_tags_be_browser_title02_1.gif|}}
Line 74: Line 76:
===== Entry in the article basis information: ===== ===== Entry in the article basis information: =====
-Zu jedem Artikel können gezielte Informationen zum "Browser-Titel", den "meta descriptions" und den den "meta keywords" hinterlegt werden.+For each article, targeted information on the "Browser Title", the "meta descriptions" and the "meta keywords" can be stored.
{{:deutsch:technik:title_meta_tags_be_artikel02_1.gif|}} {{:deutsch:technik:title_meta_tags_be_artikel02_1.gif|}}
Line 94: Line 96:
<note> <note>
-**Die meta description aus dem Artikel überschreibt nicht eine vielleicht vorhandene meta description in der Vorlage.**+**Die meta description aus dem Artikel überschreibt nicht eine vielleicht vorhandene meta description in der Vorlage.** [[english/technics/title-and-meta-tags#scriptdescription_from_article_into_the_head_area|See also the script to do so]].
</note> </note>
Line 263: Line 265:
\\ \\
-===== Script: Dwscription from article into the <head> area =====+===== Script: Description from article into the <head> area =====
**Problem:** **Problem:**
-> Man kann ja in den Artikeln meta-descriptions anlegen, die auch wunderbar gezeigt werden. Ich möchte dies jedoch nicht für alle Artikel machen und daher eine Default-Description in der Vorlage hinteregen. Leider werden dann auf allen Seiten, die im Artikel eine description haben, doppelte Meta descriptions gezeigt. + 
 +> In all articles we can create meta descriptions that are also shown wonderful. I would not do this for all articles and deposit, therefore, a default description in the original. Unfortunately, on all sides are double meta-descriptions shown if a description is listed in the article. 
Forum: [[http://forum.phpwcms.org/viewtopic.php?p=134407|default meta description]] Forum: [[http://forum.phpwcms.org/viewtopic.php?p=134407|default meta description]]
Line 272: Line 276:
**Solution:** \\ **Solution:** \\
-Description, Keywords und Title sollten eigentlich in jeder Kategorie angelegt werden. Das war wohl die ursprüngliche Idee. In diesem Fall werden diese Werte von den Einträgen im Artikel autom. überschrieben, wenn vorhanden. \\ +Description, keywords and title should actually be applied in every category. That was probably the original idea. In this case, these values ​​are overwritten by the entries in the item automatically, if available. \\ 
-Allerdings setzt fast jeder Benutzer diese Werte direkt in die Vorlage ein und das ist mit dem System nicht kontrollierbar.+However, almost every user put these values ​​directly into the template and this can not be controlled by the system afterwards.
-Das oben gezeigt Script überschreibt die vorhandenen Einträge in <head> mit den Werten aus der Kategorie. 
-Das hilft uns jedoch auch nicht viel weiter, wenn Daten im <head> vorhanden sind und der Artikel seine Daten dort zusätzlich einträgt. \\ +The script shown above will overwrite the existing entries in <head> with the values ​​of the category.
-Also muss ein Script her //(in /frontend_render/..)// das ähnlich arbeitet wie das oben gezeigte Script //(greift schon wesentlich eher an, in /frontend:init/..)//. +
-Blöderweise wird in $content['articles'] das DB Feld article_description der Tabelle phpwcms_article nicht mitgeführt, daher braucht es einen zusätzlichen DB Zugriff. \\ +That does not help when in <head> data are available and the articles there also enters his data. \\ 
-Die ganze Sache darf nur arbeiten wenn der Artikel in Detailmodus dargestellt wird ([[deutsch/technik/systemvariablen|$aktion[4]]] = 1). \\+So a script can be created //(in /frontend_render/..)// that is similar to the one shown above. //(runs much earlier in /frontend:init/..)//.
-[[deutsch/technik/systemvariablen|$aktion[1]]]  beinhaltet die Artikel-ID. 
 +
 +In stupid manner in $content['articles'] the DB field of the table article_description phpwcms_article is not carried, so it needs an additional DB access. \\
 +The whole thing should work only if the article is presented in detail mode ([[english/technics/system-variables|$aktion[4]]] = 1). \\
 +
 +[[english/technics/system-variables|$aktion[1]]]  beinhaltet die Artikel-ID.
 +
 +----
 +This script will overwrite existing values ​​that are in the template. \\
 +For this to work well, the entries for description and keywords in the template to be built cleanly. This applies to the notation of the spaces in the identifier.
 +
 +Wrong:
 +<code>
 +<meta  name= "description"   content=xyz"/>
 +</code>
 +
 +correct:
 +<code>
 +<meta name="description" content=xyz" />
 +</code>
 +----
 +
 +\\
**File:** template/inc_script/frontend_render/article_entries_into_head.php **File:** template/inc_script/frontend_render/article_entries_into_head.php
english/technics/title-and-meta-tags.1330161737.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0