Using TopStyle for MVC application with URL rewriting

Newsgator Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Using TopStyle for MVC application with URL rewriting Expand / Collapse
Author
Message
Posted 5/10/2008 11:49:07 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 5/10/2008 1:48:55 PM
Posts: 1, Visits: 5
I am considering using TopStyle to develop XHTML/CSS for a PHP MVC application that uses Smarty template views, URL rewriting, and dynamic/static content sepration. There is no single "root folder", but files are in various locations in my project. Also, templates can include other temples, and tags are generated by template macros and don't appear verbatim in the markup. All this should in theory be no obstacle for TopStyle to function properly, yet I can not configure Topstyle to behave the way I want to work in this environment. What I need is the following behavior:

1) Map an arbitrary HTML (template) source file to an arbitrary URL, e.g.
X:\Dev\www\application\views\pages\main_home.tpl => http://localhost/
X:\Dev\www\application\views\pages\main_search.tpl => http://localhost/s1?q=ipod
X:\Dev\www\application\views\pages\auth_signin.tpl => http://localhost/l
etc.
Though this seems trivial, it's apparently not possible. It would even help if I could just force the browser to always show a single fixed URL, but even that seems not to be possible, it apparently must always use the smartypants mapping. Is there a solution to this?

2) When I hit refresh (F5), I want my source file to be saved and the embedded browser preview to reload, or, even better, do this as I type, so I can immediately see the effect. Again I cannot configure this, need to manually save, then hit refresh it seems -> tedious.

3) Can I just tell TopStyle a list of folders/files where to look for CSS (like DreamWeaver "Design Time")? My CSS files are located in X:\Dev\www\htdocs-static\css and some other folders, and the tags are generated by template macros, so they cannot simply be automagically parsed out of my HTML.

4) Can I tell TopStyle to run the W3C validation on the HTML/CSS that comes back from the server (localhost), not my source template?

Thanks!
Markus
Post #39548
Posted 5/11/2008 9:32:51 PM
Rockstar

Rockstar

Group: Forum Members
Last Login: 5/11/2008 9:27:41 PM
Posts: 108, Visits: 143
I'm assuming you've gone here:

Options -- Options -- Preview -- Mappings   ?

Also, In the 'Output' Panel where the browser is, there is a 'Customize Preview Files' where you can specify a file, or in your case a URL to preview the css file.

Does this help? 

Matt Zur
zurnet.com
zsubway.com

Post #39570
« Prev Topic | Next Topic »


All times are GMT -7:00, Time now is 3:15am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.187. 10 queries. Compression Disabled.

NewsGator.com | Support | Developers | Partners | Press | Company
© Copyright 2003-2008  NewsGator Technologies, Inc. All Rights Reserved.
Copyright Information | Privacy Policy | Terms of Service
Microsoft Gold Certified Partner