PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > php pseudo frames with smarty
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
php pseudo frames with smarty

Réponse
 
LinkBack Outils de la discussion
Vieux 19/09/2006, 16h28   #1
Jonathan Dray
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut php pseudo frames with smarty

Hi

I'm new to smarty and I'm trying to implement the php pseud-frames
navigation system with smarty.
Here is the way I'm doing it right now :


$smarty->display('header.tpl');
include 'mypage.php';
$smarty->display('footer.tpl');

the include page could be any ressource like images, php file, html or
other...

Is it a good / bad way of doing pseudo frames with smarty ?
Do you have other solutions / other navigation techniques ??

  Réponse avec citation
Vieux 19/09/2006, 16h31   #2
Jonathan Dray
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: php pseudo frames with smarty

2006/9/19, Jonathan Dray <jonathan.dray@gmail.com>:
>
> Hi
>
> I'm new to smarty and I'm trying to implement the php pseud-frames
> navigation system with smarty.
> Here is the way I'm doing it right now :
>
>
> $smarty->display('header.tpl');
> include 'mypage.php';
> $smarty->display('footer.tpl');
>
> the include page could be any ressource like images, php file, html or
> other...
>
> Is it a good / bad way of doing pseudo frames with smarty ?
> Do you have other solutions / other navigation techniques ??
>
>
>


  Réponse avec citation
Vieux 19/09/2006, 16h38   #3
Marc Saric
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] php pseudo frames with smarty

Hi Jonathan,

I'm not shure your approach will work, because Smarty -beeing a
templating engine- expects a complete HTML page, which is delivered by
the Web-server once the display-method has been called.

Maybe I have overlooked some config-option in Smarty, but normaly you do
the following:

$smarty = new Smarty();

$smarty->assign("bla", "content") # Add data to the object

$smarty->display("template.tpl") # Template is beeing processed, data
from $smarty object is beeing inserted, template is converted to HTML
and send to the client by the web-server.

with all variable parts going into assign-statements.

i.e.

$smarty->assign("header", "content")
$smarty->assign("body", "content")
$smarty->assign("footer", "content")

should work.

And of course you can include snippets inside the templates themselves
(that's what I usualy do to split constant stuff out of HTML-pages).

Jonathan Dray wrote:
> Hi
>
> I'm new to smarty and I'm trying to implement the php pseud-frames
> navigation system with smarty.
> Here is the way I'm doing it right now :
>
>
> $smarty->display('header.tpl');
> include 'mypage.php';
> $smarty->display('footer.tpl');
>
> the include page could be any ressource like images, php file, html or
> other...
>
> Is it a good / bad way of doing pseudo frames with smarty ?
> Do you have other solutions / other navigation techniques ??


--
Bye,

Marc Saric
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h39.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09254 seconds with 11 queries