Page 1 of 2
extract the current menu item as a title?
Posted: Mon 23. Feb 2004, 00:49
by habi
Is there already a replacement tag to extract the current menu item for using it as a page title?
Posted: Mon 23. Feb 2004, 18:05
by habi
ok.
solved it because I need this feature:
Code: Select all
// -------------------------------------------------------------
// PAGETITLE replacement
if( ! (strpos($content["all"],'{PAGETITLE}')===false)) {
$content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]]["acat_name"], $content["all"]);
}
// -------------------------------------------------------------
place this into content.func.inc.php if you want to use it. It just returns the current menuitem as a string.
Posted: Mon 23. Feb 2004, 19:13
by frold
cool
Posted: Wed 14. Apr 2004, 22:29
by Jan212
nice, haven't seen that before, could i place it at wcmsrockt?
Posted: Mon 19. Apr 2004, 22:25
by adam
Hello!
How can I edit the CSS of the {PAGETITLE}?
Adam
Posted: Sat 24. Apr 2004, 01:10
by Oliver Georgi
Bit enhanced - the if clause isn't neccessary because search would have run 1 times too much. And it is importamt to use html_specialchars().
Code: Select all
// -------------------------------------------------------------
// PAGETITLE replacement
$content["all"] = str_replace('{PAGETITLE}',
html_specialchars($content["struct"][$content["cat_id"]]["acat_name"]),
$content["all"]);
// -------------------------------------------------------------
Oliver
Posted: Sat 24. Apr 2004, 09:03
by frold
moved to "hacks & enhancements"
Posted: Sun 25. Apr 2004, 22:32
by argos
Can somebody please explain a bit more what this does? And where to put the code?
Posted: Sun 25. Apr 2004, 22:36
by frold
argos wrote:Can somebody please explain a bit more what this does? And where to put the code?
you can use this replacement tags {PAGETITLE} for getting the pagetitle
Posted: Mon 3. May 2004, 18:08
by adam
Hello!
I integrated this in my page but the "old" pagetitle is shown at its "old" place. So I have the pagetitle twice - the old one and the one who is generated by the {PAGETITLE} tag. How can I remove the old pagetitle?
Adam
Posted: Thu 6. May 2004, 01:53
by adam
Could anybody help me?
Adam
Posted: Mon 7. Jun 2004, 17:59
by adam
Hello!
If you only change the
content.func.inc.php the "old" title still appears. You have to change the
content.article.inc.php like that:
Code: Select all
//Artikelüberschrift, Subheadline, Summary
//$content["main"] .= ($row["article_title"] && !$row["article_notitle"]) ?
// $template_default["article"]["title_before"].
// span_class(html_specialchars($row["article_title"]),$template_default["article"]["title_class"]).
// $template_default["article"]["title_after"]
// : "";
Set "//" at the beginning of lines 83 - 87
Now I helped myself
Adam
Posted: Mon 7. Jun 2004, 18:40
by Oliver Georgi
set the mark for hiding the pagetitle in article summary. Then there is no need to uncomment.
Oliver
Posted: Mon 7. Jun 2004, 20:03
by adam
Where do I find this article summary?
Posted: Mon 7. Jun 2004, 20:14
by Oliver Georgi
in backend where you can edit article title - there is a mark you can set for hiding the article title.
Oliver