Using Dreamweaver or any other Xhtml editow in design mode ( GUI Mode ) displays all tpl files as Junk. with lots of g->text and no formatting. information.
I prefer not to have to edit the code by hand if I am going to change a layout. (yes .local) Is there a way or an editor that works with all this criptic smarty code?
Thanks!
Posts: 32509
either customize your dreamweaver extensions to display .locale and .tpl as HTML (dreamweaver can do lots of things ).
or
rename the .tpl / .tpl.locale to .html for editting and when you're finished, save it as .tpl.locale
Posts: 9
I've tried that. Perhaps I'm expecting something other then what i'm getting.
an example....
Open global.tpl under design mode in Dreamweaver. ( See Attachment)
look at the layout. the 2 IMGs are broken as well as any layout deinition. Looking at the source for the images shows {{g->url href=} and not the actual reference for the pic. ( it should say images/gallery.gif ) I was expecting Table Layouts and positioning information as in a nice easy to edit GUI
This thyme is carried out in all G2 TPL files.
Typically PHP TPL files are edited nicely, I suspect its Smarty code for G2 :cry: .
Any Ideas
Posts: 32509
i see, i'm sure you could create a dreamweaver extension for G2 templates, perhaps a smarty extension for dreamweaver already exists.
actually, you can edit these files, create tables with the dreamweaver GUI etc.
the {include file="gallery..."} instructions must be displayed, don't you want to know what content is inserted in the template?
Posts: 9
If you know of a smarty extension please let me know.
Just as an example. If I change the page background color.
I get a smarty error when run.
If I cange the Pic SRC. I get an error as well.
It seems these pages can not be changed. as is.
Posts: 7994
I have only a passing familiarity with Dreamweaver. However, I know that the contents of the .tpl files are snippets of valid XHTML 1.0 strict. The Smarty tags that we're using are mostly standard Smarty with a few of our own extensions, but nothing major. So I've got to assume that either Dreamweaver is not capable of editing Smarty files or you're using it incorrectly.
There's pretty much no way that you're going to be able to use Dreamweaver as a WYSIWYG editor for Smarty files, since the bulk of the rendering is dynamic and the all the data you need to display the page isn't going to be there when you're editing the page. This means that no matter what you do, pretty much all URLs are going to be broken (image src urls, anchors, etc) since Dreamweaver won't be able to figure out the right values to put there. I could be wrong, maybe some Dreamweaver expert can shed some light here. However, all Smarty tags are contained in {curly braces} so anything that's not embedded inside an XHTML element should at least show up as plain text.
Furthermore, if you made changes and then got a Smarty error then the odds are that you broke the Smarty code itself by your changes.
Maybe Dreamweaver has a mode where you can edit the source code directly?
Posts: 974
http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=dreamweaver+smarty
more specifically:
http://smarty.incutio.com/?page=ConfiguringDreamweaver
Posts: 238
The link jmullan posted will help anyone who get's the message that Dreamweaver doesn't recognize the .tpl extension. Getting Dreamweaver to process Smarty, let alone PHP, in it's design view just won't happen. You must edit the code in Dreamweaver's code view and look at pages after they've been processed by the PHP module on your web server.
I don't think there are any WYSWUG HTML editors that process and display PHP output.
Posts: 32509
The php code coloring and knowing what a comment is etc. is all defined in a dreamweaver config which is very extensible. but even dreamweaver has not WYSIWYG for php, of course not. and you won't have WYSIWYG for smarty.
but you can configure dreamweaver to highlight smarty tags, hide comments etc., that's what the above link is for.
Posts: 9
Thanks, That answers alot!
Bill Russell
Posts: 6
actually dzsoft php editor will come a long way
just hit the previeuw button and it shows ya the webby as its gonna work AFTER you messed with the codes
no need for saving first even
and undo will be still there
Posts: 2
TPL files are snippets of valid XHTML 1.0 strict.
Many php systems use it just like jsp using XML
Funny Jokes
Posts: 5
why on earth would the devs use tpl. they just made it impossible to edit it in WYSWUG editors.
? with so many formats out there.
asp.net
asp
php
jsp
so many with WYSWUG support.
whats with you guys i'v seen so many good open source projects. use TPL
come on stop with that shit ! if you want progress TPL aint the way forward.
Posts: 80
MS?dnvp
asp.net and asp good?????
The reason being probably that MS messed up a lot for people like me.
TPL as far as I get it, or rather smarty has to do with content management.
Now I'm strugling here as well in order to move things around on the page.
But I will get there
Hell anyone here how I get the maccintosh i am going to buy to dualboot on linux/unix... i just hate how ms brainwashed i am.
Posts: 1
How to edit TPL files in WYSIWYG mode in Dreamweaver MX and Adobe GoLive
http://www.phpbb.com/community/viewtopic.php?t=141613
Posts: 19
All you have to do is just choose the "Code" view display option in Dreamweaver and it will display just fine.
Posts: 19
.