4images Forum & Community

4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: HelpMeNow on April 30, 2003, 04:13:23 PM

Title: V@no: How can i add a "site menu bar" to all templ
Post by: HelpMeNow 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.
Title: V@no: How can i add a "site menu bar" to all templ
Post by: V@no on April 30, 2003, 04:21:26 PM
u can do it as did Vienix in his templates (http://4homepages.de/forum/viewtopic.php?t=769)
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.
Title: V@no: How can i add a "site menu bar" to all templ
Post by: HelpMeNow on April 30, 2003, 04:39:42 PM
okay....thankx V@no.  :D
Title: V@no: How can i add a "site menu bar" to all templ
Post by: V@no 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.
Title: V@no: How can i add a "site menu bar" to all templ
Post by: HelpMeNow 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!
Title: V@no: How can i add a "site menu bar" to all templ
Post by: V@no 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...
Title: V@no: How can i add a "site menu bar" to all templ
Post by: EverythingViet.com on May 01, 2003, 02:56:17 AM
Quote from: V@no
u can do it as did Vienix in his templates (http://4homepages.de/forum/viewtopic.php?t=769)
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.