Verwendung der Registerkarten und der Lead Story - Using the tabed interface and the lead story

Last update: Apr 8, 2008

Dieses Tutorial zeig Euch wie man mit BranfordMagazine das “Tabed interface” - also die Registerkarten auf der Homepage - und die Lead-Story verwendet. The english version of this tutorial can be found further down the page.

Verwendung der Registerkarten und der Lead Story

BranfordMagazine unterstützt die Verwendung eines Leitartikels mit Photo, Kategorietitel, Artikelüberschrift und Kurzfassung des Beitrags. Dieser Bereich ist Teil der Registerkarten oben auf der Startseite. Der Inhalt der Registerkarten wird in der Datei “ui.tabs.php” festgelegt und konfiguriert. Alles, was als Registerkarte gezeigt werden soll, muss dort festgelegt werden.

Beginnen wir mit dem Photo. Lade ein passendes Photo (300×200 Pixel ist eine gute Größe) mit dem standard WP-Upload Werkzeug hoch. Versichere Dich, dass Du den Standard Uploadpfad verwendest (in der Regel /wp-content/uploads/).

Schreibe Deinen Beitrag und weise ihn der entsprechenden Kategorie zu (Standardmäßig verwendet das Theme die Kategorie mit der ID 1). Um die beste Kontrolle über den angezeigten Text zu bekommen, verwende die Möglichkeit der “optionalen Kurzfassung”, welche eine Standardfunktion beim Schreiben von Beiträgen ist.

Definiere dem Schlüssel und den Wert des benutzerdefinierten Feldes “leadimage”. Der Schlüssel ist hierbei “leadimage” und der Wert, der Pfad des Bildes nach dem Teilpfad /wp-content/uploads/. Den Pfad findest Du ganz einfach im Upload Bereich indem Du das Bild anzeigst und die Editieren Möglichkeit nutzt. Hier wird der gesamt Pfad des hochgeladenen Bildes angezeigt. Wenn Du einmal einen Schlüssel festgelegt hast, steht er immer über das Pulldown Menü zur Verfügung und muss nicht immer wieder eingetippt werden. Im folgenden Bild siehst Du alle Schlüssel, die für Banford Magazine insgesamt verwendet werden sowie ein Beispiel für den Wert des Schlüssels “leadimage” der das Bild des Leitartikels auf der Homepage ausgibt.

Alle benötigten benutzerdefinierten Felder
Alle benötigten benutzerdefinierten Felder

Du kannst fast jede Art von Inhalten in den Registerkarten darstellen. Seien es die letzten Posts, die beliebtesten Posts, letzte Kommentare oder einfach nur einen beliebigen Text. Manche Varianten benötigen zusätzliche Plugins (wie z.B. die beliebtesten Beiträge).

Zunächst öffnest Du “ui.tabs.php” und erstellst einen Link nach diesem Schema. Im Beispiel wollen wir einen Tab mit der Bezeichnung “About this theme” und den dazugehörigen Inhalt erstellen.

Creating the link - Erstellen des Links
Creating the link - Erstellen des Links

Nachdem Du den eigentlichen Link (also den Tab) erstellt hast, musst Du nun den Inhalt festlegen. In diesem Fall ist es einfacher Text. Du kannst aber im grunde genommen in den Tab platzieren, was immer Du willst (wie schon erwähnt).

Creating the content of the tab - Den Tab Inhalt erstellen
Creating the content of the tab - Den Tab Inhalt erstellen

How to use the tabed section and the lead story

BranfordMagazine features a lead story with a photo, a category title, an article title and an excerpt. This is part of the tabed section on top of the homepage. The content of the tabed section will be defined and configured in the “ui.tabs.php” file. Everything that is displayed as a tab and its content has to be configured here.

Let’s start with the photo. First find an appropriate image and resize it to a size that fits (300×200px is fine). Next, upload it using standard WP-Upload functionality. Make sure the standard upload path is used (normally /wp-content/uploads/).

Write your story and put it into the right category (Standard is the category with ID 1). You might also write an optional excerpt for full text control.

Define the custom field key and value by typing the name of the key “leadimage” and it´s value which is the path of the image after /wp-content/uploads/. This is quite easy to find in the uploader of the post. Once you have typed in a key it is available for all other posts, so you don´t have to type it in twice. In the picture you see all required keys and an example of the value for the lead image.

All required Custom Fields
All required Custom Fields

You can put almost any type of content into the tabed section like most recent posts, popular posts, recent comments or simply some text. For some purposes you need to install certain plugins (like for the popular posts).

You start by opening “ui.tabs.php” and create the link which will be the tab by following this scheme. As an example we will create a tab called “About this Theme” with its content.

Creating the link - Erstellen des Links
Creating the link - Erstellen des Links

After you have created the link itself you need to define the content of that tab. In the example it´s just simple text. But you can put almost anything here you like (as already mentioned).

Creating the content of the tab - Den Tab Inhalt erstellen
Creating the content of the tab - Den Tab Inhalt erstellen



About this entry