extract the current menu item as a title?
extract the current menu item as a title?
Is there already a replacement tag to extract the current menu item for using it as a page title?
ok.
solved it because I need this feature:
place this into content.func.inc.php if you want to use it. It just returns the current menuitem as a string.
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"]);
}
// -------------------------------------------------------------
nice, haven't seen that before, could i place it at wcmsrockt?
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
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().
Oliver
Code: Select all
// -------------------------------------------------------------
// PAGETITLE replacement
$content["all"] = str_replace('{PAGETITLE}',
html_specialchars($content["struct"][$content["cat_id"]]["acat_name"]),
$content["all"]);
// -------------------------------------------------------------
Oliver
moved to "hacks & enhancements"
http://www.studmed.dk Portal for doctors and medical students in Denmark
you can use this replacement tags {PAGETITLE} for getting the pagetitleargos wrote:Can somebody please explain a bit more what this does? And where to put the code?
http://www.studmed.dk Portal for doctors and medical students in Denmark
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:
Set "//" at the beginning of lines 83 - 87
Now I helped myself
Adam
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"]
// : "";
Now I helped myself
Adam
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact: