Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Title - dynamiczny układ
aglar
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 1.07.2009

Ostrzeżenie: (0%)
-----


Witam, jestem zielony z php, ale mysle ze przy waszej pomocy bede mogl zmodyfikowac jedna rzecz. Na swoim forum mam takie title:

  1. <?php
  2. <title>', $context['page_title'], '</title>;
  3. ?>


I jest tak ze dla kazdego page mam inny title. Jednakze title z glownej strony, chcialbym miec inne niz z page_title. Czy mozecie mi pomoc ulozyc taki kod, ktory by pozwalal na pozostawienie obecnego ustawienia title a jednoczesnie na mozliwosc ulozenia osobnego title dla glownej strony (index.php)?

Ten post edytował aglar 1.07.2009, 13:18:18
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
aglar
post
Post #2





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 1.07.2009

Ostrzeżenie: (0%)
-----


Dziekuje za tak szybka i konkretna pomoc!

Tagi zostaly dodane (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

@cojack: Po dodaniu Twojego kodu pojawil sie blad, pewnie wynika to z tego ze brakuje jakiegos `. a moze {} (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

Moglbys rzucic okiem na ten blad?

Template Parse Error!
There was a problem loading the /index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

  1. <?php
  2. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in index.template.php on line 81
  3. 72:     <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
  4. 73:     <script language="JavaScript" type="text/JavaScript" src="http://www.xyz.pl/phpTACookie.js"></script>
  5. 74:     <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
  6. 75:         var smf_theme_url = "', $settings['theme_url'], '";
  7. 76:         var smf_images_url = "', $settings['images_url'], '";
  8. 77:         var smf_scripturl = "', $scripturl, '";
  9. 78:         var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
  10. 79:         var smf_charset = "', $context['character_set'], '";
  11. 80:     // ]]></script>
  12. 81: if(basename($_SERVER['SCRIPT_FILENAME']) == 'index.php')
  13. 82: {
  14. 83:  echo '<title>custom title ' . $context['page_title'] . ' albo z tej strony</title>';
  15. 84: }
  16. 85: else
  17. 86:{
  18. 87: echo '<title>' . $context['page_title'] . </title>;
  19. 88:}
  20. 89:
  21. 90:    //
  22. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 30.12.2025 - 17:20