RE: [Mav-user] Directory heirarchy when using Shunts Modes
I tried the code below. I can see the images at runtime, but not during design time. If I change the paths to see it at design time, then I can't see the images during runtime. head titleTest Page/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / link href=en/includes/screen_styles.css rel=stylesheet type=text/css media=screen/ link href=en/includes/print_styles.css rel=stylesheet type=text/css media=print/ /head ... table width=100% border=0 cellspacing=0 cellpadding=0 class=box1 tr td width=30 nowrapa href=http://www.lds.org; target=_topimg src=en/images/nav-small_christus.gif alt=The Church of Jesus Christ of Latter-day Saints border=0 width=30 height=20/a/td td width=100% nowrapa class=anchorHeader href=http://www.lds.org; title=The Church of Jesus Christ of Latter-day Saints target=_topThe Church of nobrJesus Christ/nobr of nobrLatter-day/nobr Saints/a/td td align=rightimg border=0 src=en/images/spacer.gif width=8 height=20/td td align=right nowrap valign=middle/td /tr /table Should I be using a transform to change the relative paths that Dreamweaver needs at design time to full paths that the browser needs at runtime? Maybe this is overkill, but I could use an XSLT to modify my Maverick.xml to include a default transform for all views that have *.vm files. This transform would change all the paths in the *.vm file to full paths. Please tell me that there's a better (and easier) way! :-) Thanks, Scott [EMAIL PROTECTED] 03/24/03 04:08PM Can you show an example of your vm files? I'm taking a wild guess at what you're trying to do here. Server-side includes will work with relative paths, however client-side includes won't. If you have a command something.m which includes a snippet of HTML like this: img src=images/foo.gif/ Then the browser is going to try to load the file /include/foo.gif - it has no idea how things are really structured on the backend. Your Japanese vm file needs to have a full path: img src=jp/images/foo.gif/ Does that explain the problem you're having? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 9:12 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Directory heirarchy when using Shunts Modes I am using Velocity + Maverick and Dreamweaver to create the *.vm files. I first developed my *.vm files in English. To better organize my files, I create various subdirectories for images and includes. Then I added the org.infohazard.maverick.shunt.LanguageShuntFactory and created resources for mode=jp (Japanese). I placed the en jp files under: context-/en/*.vm ||--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif ||--/includes/*.css |---/jp-/*.vm |--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif |--/includes/*.css Everything works fine during design time, but as expected, not when I deployed. The *.vm files did not see the files in the images and includes subdirectories. Is there any way to make this directory structure work when I deploy? As usual, thanks. Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en [INVALID FOOTER]
RE: [Mav-user] Directory heirarchy when using Shunts Modes
Interesting problem. Are you on a unix system? One solution would be to create a symlink in the directory with your vm files: en - . This would allow Dreamweaver to resolve the references in the filesystem. That is a pretty akward. It's difficult to use static tools like Dreamweaver to edit dynamic web applications because requests to commands (and thus the vm files) are converted with the additional path, but requests for image files are not. Another possible solution to this problem (the one I recommend if you want to preserve your directory structure) is to build a servlet filter that munges the paths for image (and css) paths. The filter would handle all requests for /includes/* and /images/*, check the Accept-Language header (just like the Shunt), and prepend /en or /jp before passing the request down the chain. Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 7:25 AM To: [EMAIL PROTECTED] Subject: RE: [Mav-user] Directory heirarchy when using Shunts Modes I tried the code below. I can see the images at runtime, but not during design time. If I change the paths to see it at design time, then I can't see the images during runtime. head titleTest Page/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / link href=en/includes/screen_styles.css rel=stylesheet type=text/css media=screen/ link href=en/includes/print_styles.css rel=stylesheet type=text/css media=print/ /head ... table width=100% border=0 cellspacing=0 cellpadding=0 class=box1 tr td width=30 nowrapa href=http://www.lds.org; target=_topimg src=en/images/nav-small_christus.gif alt=The Church of Jesus Christ of Latter-day Saints border=0 width=30 height=20/a/td td width=100% nowrapa class=anchorHeader href=http://www.lds.org; title=The Church of Jesus Christ of Latter-day Saints target=_topThe Church of nobrJesus Christ/nobr of nobrLatter-day/nobr Saints/a/td td align=rightimg border=0 src=en/images/spacer.gif width=8 height=20/td td align=right nowrap valign=middle/td /tr /table Should I be using a transform to change the relative paths that Dreamweaver needs at design time to full paths that the browser needs at runtime? Maybe this is overkill, but I could use an XSLT to modify my Maverick.xml to include a default transform for all views that have *.vm files. This transform would change all the paths in the *.vm file to full paths. Please tell me that there's a better (and easier) way! :-) Thanks, Scott [EMAIL PROTECTED] 03/24/03 04:08PM Can you show an example of your vm files? I'm taking a wild guess at what you're trying to do here. Server-side includes will work with relative paths, however client-side includes won't. If you have a command something.m which includes a snippet of HTML like this: img src=images/foo.gif/ Then the browser is going to try to load the file /include/foo.gif - it has no idea how things are really structured on the backend. Your Japanese vm file needs to have a full path: img src=jp/images/foo.gif/ Does that explain the problem you're having? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 9:12 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Directory heirarchy when using Shunts Modes I am using Velocity + Maverick and Dreamweaver to create the *.vm files. I first developed my *.vm files in English. To better organize my files, I create various subdirectories for images and includes. Then I added the org.infohazard.maverick.shunt.LanguageShuntFactory and created resources for mode=jp (Japanese). I placed the en jp files under: context-/en/*.vm ||--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif ||--/includes/*.css |---/jp-/*.vm |--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif |--/includes/*.css Everything works fine during design time, but as expected, not when I deployed. The *.vm files did not see the files in the images and includes subdirectories. Is there any way to make this directory structure work when I deploy? As usual, thanks. Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored
RE: [Mav-user] Directory heirarchy when using Shunts Modes
Can you show an example of your vm files? I'm taking a wild guess at what you're trying to do here. Server-side includes will work with relative paths, however client-side includes won't. If you have a command something.m which includes a snippet of HTML like this: img src=images/foo.gif/ Then the browser is going to try to load the file /include/foo.gif - it has no idea how things are really structured on the backend. Your Japanese vm file needs to have a full path: img src=jp/images/foo.gif/ Does that explain the problem you're having? Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Scott Chun [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 9:12 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Directory heirarchy when using Shunts Modes I am using Velocity + Maverick and Dreamweaver to create the *.vm files. I first developed my *.vm files in English. To better organize my files, I create various subdirectories for images and includes. Then I added the org.infohazard.maverick.shunt.LanguageShuntFactory and created resources for mode=jp (Japanese). I placed the en jp files under: context-/en/*.vm ||--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif ||--/includes/*.css |---/jp-/*.vm |--/images/*.gif | |--/brand_tabs/*.gif | |--/inactive_tabs/*.gif |--/includes/*.css Everything works fine during design time, but as expected, not when I deployed. The *.vm files did not see the files in the images and includes subdirectories. Is there any way to make this directory structure work when I deploy? As usual, thanks. Scott -- This message may contain confidential information, and is intended only for the use of the individual(s) to whom it is addressed. == --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en [INVALID FOOTER] --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]