Author Topic: V@no: How can i add a "site menu bar" to all templ  (Read 9675 times)

0 Members and 1 Guest are viewing this topic.

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
V@no: How can i add a "site menu bar" to all templ
« on: April 30, 2003, 04:13:23 PM »
I want to make one template page called: menu_bit.html. Inside it I'll have the site's links menu bar.

Then I want to call the content of that template inside some other templates, such as home.html. This way if a change is needed, I can only edit the menu_bit.html template.

How can I do this?

 :!: V@no, sure could help your expertise plz. Thankx.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
V@no: How can i add a "site menu bar" to all templ
« Reply #1 on: April 30, 2003, 04:21:26 PM »
u can do it as did Vienix in his templates
create menu.php in 4images root dir, with all the links in there and then just add in your templates:
<?php
include('menu.php');
?>

that should do the trick.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
V@no: How can i add a "site menu bar" to all templ
« Reply #2 on: April 30, 2003, 04:39:42 PM »
okay....thankx V@no.  :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
V@no: How can i add a "site menu bar" to all templ
« Reply #3 on: April 30, 2003, 06:26:17 PM »
Quote from: Cr@zy Sash
But if do it linek 4menu.php u can't add javascript.
are u sure about that? if u add HTML code (including javascript) outside of <?php or ?> then php just ignore it and sent to the browser as it is.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
V@no: How can i add a "site menu bar" to all templ
« Reply #4 on: April 30, 2003, 10:34:13 PM »
Quote from: Cr@zy Sash
well and another solution: i add a {naviagtion} in my templates. And than i made a naviagtion.html template and when u do it like me u can add java script as well.


Is it really as simple as it sounds?

I mean in order for {naviagtion} to work in different templates, do I simply have to make an html template named naviagtion.html ???

Please let me know, because I could use this as well

awaiting answer!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
V@no: How can i add a "site menu bar" to all templ
« Reply #5 on: April 30, 2003, 10:45:12 PM »
Quote from: HelpMeNow
Is it really as simple as it sounds?

I mean in order for {naviagtion} to work in different templates, do I simply have to make an html template named naviagtion.html ???

Unfortunetly its not that simple... :(
Before u can use {...} tags, u must register them in the code. And that's the tricky part, because if u dont know how it works, its hard to determin where it must be edited...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline EverythingViet.com

  • Pre-Newbie
  • Posts: 7
    • View Profile
V@no: How can i add a "site menu bar" to all templ
« Reply #6 on: May 01, 2003, 02:56:17 AM »
Quote from: V@no
u can do it as did Vienix in his templates
create menu.php in 4images root dir, with all the links in there and then just add in your templates:
<?php
include('menu.php');
?>

that should do the trick.


When you say "just add in your templates", which templates do you mean?

4images is the first application that I see not using include very well, except the header and footer. The left menu is separated into many small parts and each is included in MANY templates.

Ideally, you want the WHOLE left menu as one thing, included in just ANOTHER ONE thing.