[phpBB Debug] PHP Warning: in file [ROOT]/ext/tas2580/seourls/event/listener.php on line 213: Undefined array key "FORUM_NAME"
Page Titles - REDAXO Forum
Hallo,

Wir haben in letzter Zeit festgestellt, dass die Kommunikation via Slack viel schneller und zielführender ist als ein Beitrag im Forum. Aufgrund der neuen und besseren Möglichkeiten der Kommunikation haben wir uns entschlossen das Forum nur noch als Archiv zur Verfügung zu stellen. Somit bleibt es weiterhin möglich hier nach Lösungen zu suchen. Neue Beiträge können nicht mehr erstellt werden.

Wir empfehlen, für deine Fragen/Probleme Slack zu nutzen. Dort sind viele kompetente Benutzer aktiv und beantworten jegliche Fragen, gerne auch von REDAXO-Anfängern! Slack wird von uns sehr intensiv und meistens "rund um die Uhr" benutzt :-)
Selbst einladen kannst Du dich hier: https://redaxo.org/slack/
Pezz
Beiträge: 17
Registriert: 3. Jul 2009, 00:57

Page Titles

21. Sep 2009, 05:52

Hi everyone,

I need to know is there way to have page titles separate from the "Artikelname" (Article Name) and still keep the link short?

Example as is:
Kategorie: About, Artikelname: Lorem Ipsum = Link: lorem-ipsum.html

I would like to have this:
Kategorie: About, Artikelname: Lorem Ipsum = Link: about.html


I need more freedom with page titles...
Do I have to change the template to get this working?
How to get the page title not from ("name")?

Code: Alles auswählen

<title><?php print $REX['SERVERNAME'].' | '.$this->getValue("name"); ?></title>
Thank you!

Benutzeravatar
michaelKeller
Beiträge: 58
Registriert: 28. Jul 2009, 08:49
Wohnort: Rosenheim
Kontaktdaten: Website

25. Sep 2009, 14:08

Hi Pezz!

VERY Simple!

Go to the menu: Addons->Meta Infos->Artikel
Here you create a new entry by clicking on the little + Symbol on the upper left corner.
Enter for "column name" (Spaltenname) alternative_title
And press the Submit button on the bottom.

Then go to your used template and change the value:

Code: Alles auswählen

<title><?php print $REX['SERVERNAME'].' | '.$this->getValue("name"); ?></title>
to:

Code: Alles auswählen

<title><?php print $REX['SERVERNAME'].' | '.$this->getValue("art_alternative_title"); ?></title>
Now you can define alternative titles for each article you enter. Therefore go to the "Metadata" Section of your article and enter some title you want in the field art_alternative_title.

Cheers!
Michael
Webdesign aus Rosenheim www.webdesigns-rosenheim.de

Pezz
Beiträge: 17
Registriert: 3. Jul 2009, 00:57

3. Nov 2009, 16:56

Hi Michael,

thank you for your help!
For some weird reason I didn't receive an email with your post reply.

Sorry! Not my fault! :D

P.S. Can you tell how to get page/article name before the server name?

Code: Alles auswählen

<title><?php print $REX['SERVERNAME'].' | '.$this->getValue("art_alternative_title"); ?></title>

Pezz

Benutzeravatar
michaelKeller
Beiträge: 58
Registriert: 28. Jul 2009, 08:49
Wohnort: Rosenheim
Kontaktdaten: Website

3. Nov 2009, 17:24

I don't completely understand your problem. I guess you additionally want your article name before the servername!?
You can get the name of the current article by calling the function getValue("name") on an article object. In whole you can do it this way:

Code: Alles auswählen

<title><?php echo $this->getValue("name").' - '.$REX['SERVERNAME'].' | '.$this->getValue("art_alternative_title"); ?></title>
Take a look at the redaxo cheat sheet. It lists all available member functions.

Regards,
Michael
Webdesign aus Rosenheim www.webdesigns-rosenheim.de

Pezz
Beiträge: 17
Registriert: 3. Jul 2009, 00:57

19. Jan 2010, 00:11

Thank you Michael!

Your help is appreciated!!!

P.

Zurück zu „Sonstiges“