4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2016, 09:53:01 AM

Login with username, password and session length
Search:     Advanced search
You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Templates & Styles (Requests & Discussions) (Moderator: Rembrandt)
| | |-+  V@no: How can i add a "site menu bar" to all templ
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: V@no: How can i add a "site menu bar" to all templ  (Read 7159 times)
HelpMeNow
Jr. Member
**
Offline Offline

Posts: 94

Thank You
-Given: 0
-Receive: 1


View Profile
« 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?

 Exclamation V@no, sure could help your expertise plz. Thankx.
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 560

mmm PHP...


View Profile WWW
« 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.
Logged

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)
HelpMeNow
Jr. Member
**
Offline Offline

Posts: 94

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #2 on: April 30, 2003, 04:39:42 PM »

okay....thankx V@no.  Very Happy
Logged
Apollo13
Addicted member
******
Offline Offline

Posts: 1325

Thank You
-Given: 0
-Receive: 3


View Profile
« Reply #3 on: April 30, 2003, 06:05:06 PM »

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. But if do it linek 4menu.php u can't add javascript.
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 560

mmm PHP...


View Profile WWW
« Reply #4 on: April 30, 2003, 06:26:17 PM »

Quote from: Cr@zy Sash   [Expand]
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.
Logged

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)
HelpMeNow
Jr. Member
**
Offline Offline

Posts: 94

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #5 on: April 30, 2003, 10:34:13 PM »

Quote from: Cr@zy Sash   [Expand]
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!
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 560

mmm PHP...


View Profile WWW
« Reply #6 on: April 30, 2003, 10:45:12 PM »

Quote from: HelpMeNow   [Expand]
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... Sad
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...
Logged

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)
EverythingViet.com
Pre-Newbie

Offline Offline

Posts: 7

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #7 on: May 01, 2003, 02:56:17 AM »

Quote from: V@no   [Expand]
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.
Logged
Apollo13
Addicted member
******
Offline Offline

Posts: 1325

Thank You
-Given: 0
-Receive: 3


View Profile
« Reply #8 on: May 08, 2003, 07:36:45 AM »

I think it is simple 2 do this I only add this in my page_header.php


1
2
3
4
5
6
7
8
9

//-----------------------------------------------------
//--- Navigation --------------------------------------
//-----------------------------------------------------
$navigation = $site_template->parse_template("navigation");
  $site_template->register_vars(array(
    "navigation" => $navigation
  ));
  unset($navigation);


And than u can use

{navigation} in your templates whereever u want. Ah u must create a new html page called navigation.html...
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.296 seconds with 19 queries.
Post your comments here