4images Forum & Community
4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started 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.
-
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.
-
okay....thankx V@no. :D
-
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.
-
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!
-
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...
-
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.