Replacement-Tag für Artikeltitel?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
axedon
Posts: 6
Joined: Fri 2. Sep 2005, 12:51

Replacement-Tag für Artikeltitel?

Post by axedon »

Hi

Ich habe weder im Forum, via Google, noch bei Peperkorn o.ä. einen Replacement-Tag für den Artikeltitel gefunden, nur ein add-on für den Titel der Seitenstruktur.

Ich würde jetzt vermuten, es gäbe ihn nicht, aber da der Artikeltitel "Standard" ist, wollte ich mal nachfragen. Vielleicht ja als add-on?

Vielen Dank!

PS: Brauche ihn für folgende Konstruktion in den Vorlagen:

Code: Select all

<div id="title"><img src="imgs/t-{TITLE_ARTICLE}.gif" alt="{TITLE_ARTICLE}" /></div>
(habe es mit TITLE, TITLE_ARTICLE, PAGETITLE, ARTICLETITLE versucht)
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Wenn ich richtig verstanden habe, willst du einen Bildernamen in Abhängigkeit von dem Titel der Seite erzeugen lassen????

Keinen Schimmer...
aber kannst du denn nicht auch für den Bildernamen den ALIAS der Seitenebene verwenden... das wäre doch auch eine Möglichkeit, oder :?:
Denn wie du deine Bilder nennst ist doch sicher dir überlassen :?:

..... dann haben wir auch schnelle eine Lösung zusammen :idea:
cwenet
Posts: 159
Joined: Sat 24. Jul 2004, 10:21
Location: Lake Of Constance, Germany

Post by cwenet »

Für PAGETITLE muss noch eine kleines Script in folgendes Verzeichnis kopiert werden:
phpwcms_template\inc_script\frontend_render

Code: Select all

<?php
// PAGETITLE replacement 
if( ! (strpos($content["all"],'{PAGETITLE}')===false)) { 
   $content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]] 
["acat_name"], $content["all"]); 
} ?>
Der Aufruf kann dann an beliebiger Stelle via {PAGETITLE} erfolgen.

Christoph
cwenet
Posts: 159
Joined: Sat 24. Jul 2004, 10:21
Location: Lake Of Constance, Germany

Post by cwenet »

Das war wohl verkehrt. Aber jetz habe ich was gefunden. Müßte normal funktionieren:

Code: Select all

<?php
// ARTICLE_TITLE replacement 
if( ! (strpos($content["all"],'{ARTICLE_TITLE}')===false)) { 
   $content["all"] = str_replace('{ARTICLE_TITLE}', $GLOBALS['row']['article_title'], $content["all"]); 
 }
?> 
Christoph
axedon
Posts: 6
Joined: Fri 2. Sep 2005, 12:51

Post by axedon »

Funktioniert. :D

Christoph dankt Christoph!
ssyfrig
Posts: 364
Joined: Tue 2. Mar 2004, 17:01
Location: Zürich / Switzerland
Contact:

Post by ssyfrig »

Gibt es eine möglichkeit das so anzuzeigen?

Code: Select all

{GT:Title}{ARTICLE_TITLE}{/GT}
is it possibly to show the RT with Mod GT?

thanks, Sven
ssyfrig
Posts: 364
Joined: Tue 2. Mar 2004, 17:01
Location: Zürich / Switzerland
Contact:

Post by ssyfrig »

I tried to edit the RT code al well but it doesn’t work.
Does any body can help me?

Thanks, Sven
Evoplure
Posts: 43
Joined: Fri 8. Jul 2005, 02:59

Post by Evoplure »

Try to copy the code without php marks in: include/inc_front/content.func.inc.php, for example after the {AUTHOR} replacement tag instruction.

The problem is that I would like to leave this file untouched and work with the Custom Replacement Tag folder (phpwcms_template\inc_script\frontend_render ). Maybe this is your case as well... I dont know how could I use GT for a custom replacement tag... and I would be very happy if someone find a solution.

Best regards
* Maybe I'm wrong * Maybe not *
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Hi ssyfrig,

so geht's... / that's the way... :idea:
// article default MIT Grafical-Text MOD
$template_default["article"]["title_before"] = '<div>{GT:brush24}';
$template_default["article"]["title_after"] = '{/GT}</div>';
Der markierte Part muß natürlich deinem "Schrifttyp" aus dem GT-MOD entsprechen...
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

Hi Pepe,

one question in general - just for better understanding:
is phpwcms doing the rendering once only and then pulling the graphical text out of cache or folder or how is this working (especially in the case above mentioned by you)

Greetings
claus
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Dont know, how it exactly works....

But if you delete the whole existing content of your content/GT directorry per FTP ... it will be generated again, if you call your pages :)

PS
have a look: http://peperkorn-online.de/gt-mod.phtml
No special tricks... and GD2 only :wink:
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

I saw it before and these types are looking much better even than my best ones. I should try it with these ones you did use to get some comparable and/or reproducable results. Testing isn't finished ever :wink:
Greetings
claus
Evoplure
Posts: 43
Joined: Fri 8. Jul 2005, 02:59

Does not work

Post by Evoplure »

pepe wrote:

$template_default["article"]["title_before"] = '<div>{GT:brush24}';
$template_default["article"]["title_after"] = '{/GT}</div>';
Unluckily, this does not work with the {ARTICLE_TITLE} replacement tag... At least to me... :cry:
* Maybe I'm wrong * Maybe not *
Moan
Posts: 28
Joined: Wed 27. Jul 2005, 01:04

Post by Moan »

Hi there,

does anyone of you know, why the {ARTICLE_TITLE}-Tag isn´t replaced when a articlemenu is one of the contentparts?

As soon, as I turn the articlemenue invisible and add a normal WYSIWYG-Element, the article´s title shows up again ?!

Thx

Dani
Post Reply