Contribute changing relative path for server-side include
I am using Contribute CS3, version 4.1, and my pages crash
every time a send a draft for review, because Contribute is
rewriting a relative URL in a server-side include.
The server-side include (before I send for review) reads:
<!--#include file="../foo/bar.fileextention"-->
After I edit other portions of the page and send the draft
for review, it reads:
<!--#include file="http:
//www.servername.com/foo/bar.fileextension"-->
Which results in the draft being unreadable.
Is there any way to tell Contribute not to monkey with this
URL? I have hunted, read the forums, checked the knowledge base,
and coming up empy.
Thanks in advance for any help you can provide!! I really
appreciate it!
-Nicholas
Answering my own question.
I researched this complete forum and with taking ideas from
different posts, I was able to figure this out. I thought I would
post it for anyone else needing to know the answer in one place:
Include tags must read:
<!--#include virtual="includes/fileName.html"-->
(Include file is NOT a real HTML doc -- no tags in file
except for CSS, as it would be used if not using Contribute.)
No reference to .dwt needed nor Template created.
No Edit instance tags needed anywhere.
Contribute user navigates to page:
[Upper right corner] Click Choose...
[In my structure] User opens includes folder (double clicks)
User selects THE file (clicks OK)
User clicks on Edit Page button
(Text is now editable.)
User edits text.
User clicks on Publish button.
Worked for me several times trying.
- Janet
Similar Messages
-
Problem in Server side includes using Tomcat
Problem in Server side includes using Tomcat:
I am trying out small programs in servlet.
I get one example program for server side includes from net.
The code is:
<HTML>
<HEAD><TITLE>Times!</TITLE></HEAD>
<BODY>
<P>
The current time in London is!!! :
<SERVLET CODE="CurrentTime" codebase="../servlet">
<PARAM NAME="zone" VALUE="GMT">
</SERVLET>
</P>
</BODY>
</HTML>
I placed this test.shtml file in tomcat-home/webapps/ROOT folder and i kept the servlet in WEB-INF/classes folder.
I renamed the servlets-ssi.jar and i removed the comments for SSI in web.xml file.
When i run the servlet separately, i am getting the correct result. But if i run shtml file with the URL : http://localhost:8080/Test.shtml,
i am getting the result as:
The current time in London is!!! :
It is not invoking servlet program.
CAN ANYONE HELP ON THIS!
Thanks.Thanks...as u said I tried putting dir & found that
my file was saved as Ch1Servlet.java.txt instead for
Ch1Servlet.java......So that was a problem.Now I'm
able to compile.Oh, yeah. Notepad will do that to you. I think when you save in Notepad if you put quotes around the name "Whatever.java" then it won't add the .txt.
But on compiling I'm getting the following error
package java.servlet.* does not exist
package java.servlet.http.* does not exist
package java.io.* does not exist
Do u the reason for this??? The servlet stuff is java[b]x.servlet. For the io stuff, I don't know, I'd have to see your code. Either you have a typo or a corrupt installation. -
Server Side Includes for Apache and parsing text files
I have an old website I used to do zipped up and I decided to set it up on my personal webserver in OS X . I got apache configured to allow server side includes (edited the httpd.conf to all them:
<Directory />
Options FollowSymLinks Indexes MultiViews Includes
AllowOverride None
</Directory>
But I can't get the pages to come up. See I have this .shtml page which loads fine and a part of it has this line:
<!--#include file="news/news.txt" -->
But it won't parse that txt file and show the html that its formatted in.
Anyone have any ideas on how to get it to parse that txt file? Even if I load just that txt file it shows raw code not it formatted. Please help.Ignore that first reply. I thought I was dealing with server.
As usual, I fogot to make sure that Includes was in the Options directive for the DOCUMENT_ROOT or VirtualHost. After 10 years, you'd think I'd remember that. I just configged one of my macs to do SSI. Here's the 3 lines that I changed:
Line 399 (the DOCUMENT_ROOT definition): Options Indexes FollowSymLinks MultiViews Includes
Line 887 (To use server parsed HTML): AddType text/html .shtml
Line 888: AddHandler server-parsed .shtml
apachectl restart
and off it went!
Roger -
Css/js relative path for embedded server
We have recently begun using relative paths for css and js files in our deployed applications:
<link href="../../resources/css/global3.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../../resources/script/globalScript.js" type="text/JavaScript"></script>
I cannot figure out where to put the resources folder on my local machine so the pages will link correctly when running a project on my embedded server in JDev. Can anyone please help?Hi,
the embedded OC4J has its configuration files at
\jdeveloper_installdir\jdev\system\oracle.j2ee.<version>\embedded-oc4j
However, if you use relative addressing then web applications try to find them relative to the public_html directory of the Viewlayer project
Frank -
Change the path for attachments after changing a server
Hello experts,
I have a requirement which I cannot solve...
By a customer a server which was used for saving the attachments is no longer active. The customer has now a file server. So in SAP we have changed the path information under Administration > System Initialisation > General Setting in the Path tab from the old server to the file server like this:
Old path:
oldServer\ALLGEMEIN\SAP\DOKUMENT_TEXT\
New Server:
newServer\ALLGEMEIN\SAP\DOKUMENT_TEXT\
But now I have the problem that all the path information in the UDFs from type LINK and also in all attachment fields like in activities, where the customer has put in a file are still standing on the old status.
We have allready copied all attachzments from the old server to the new one in the same structure as in the old server).
Now I have to change in all fields, which are from type LINK (this concerns by the customer only item master date, BP master data and activities) the path information.
That means I have to paste the string in all the fields 'oldServer' whith 'newServer'.
Has anybody an idea how I could do this???
Best regards,
VuralHi Vural,
We are facing same kind of issue with our landscape, how did you changed the path for attachments.
Tcode = IH01
Worked with user and tried to change the path for few attachments from \\old_server\GROUPS\ to \\new_server\GROUPS\ (storage server) and its worked, but as per user there are lot of files exist in server, they wants to upgrade the path for all files automatically from old_server to new_server.
Regards,
Rishi -
Server Side Includes not displaying in DW CS3 design view
I have this code in my page (see below):
When I open the file in Dreamweaver MX 2004 in design view,
the page displays correctly. That is, I see the correct styles from
the style sheet contained in Head_Standard.html and the logo/menu
in Logo_TopMenu.html
When I open the page in DW CS3, I do not see the effects of
the style sheet and I do not see the logo/menu.
However, when I change the code for the first include from:
virtual="/ServerSide
to
virtual="
../../ServerSide
then the page renders correctly in Dreamweaver CS3.
My first reaction was: what?! And my question is: how do I
use a root reference inside the head and get it to display properly
in DW CS 3?"Go to Edit > Preferences > Invisible Elements >
Server-Side Includes (Check this box) to show contents of included
file"
I already do this.
For me:
/ServerSide... does NOT work
../../ServerSide... works
So, a relative reference works and a reference to the root
does not. I have over 20 websites with root references and I need
this to work in DW9. -
Server side includes vs Library assets?
I like server side include because I just see a single line referring to the included file, and that keep my code free of 'irrelevant' detaiuls.
However, I cannot preview my program in a local browser (because the include takes place on the server, and not locally on my machine).
Is there a compromise? Is there a way to NOT have Dreamweaver CS4 (on my iMac) expand the included library code?I am not using anyPHP in this project, so I do not specify it. I tried specifying in, but that made no difference.
http://localhost shows me the default index file that is in //Application/MASMP/htdocs (sonce I used MAMP to get PHP up and running).
The issue seems to be to do with relative paths.
On my remote server I am installig the files into a folder named /NWC/ The domain name (www.BilliantlySimple.com) is set up to point to that folder.
I can see the page EXACTLY as I would expect it to be in design view, HOWEVER, when I go to live view it is not finding all of the files that it need to include. Id does find the such as the CSS file (included with the line: <link href="../_css/Test.css" rel="stylesheet" type="text/css" media="screen" />) BUT any image files included for, say background-image: url(../_images/bg_dot.gif); it does NOT find (even though images in the page itself it can find!)
I am using Pop Magic Menus 2 and including those with these lines:
<link href="../_includes/p7pmm/p7PMMh07.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="../_includes/p7pmm/p7PMMscripts.js"></script>
BUT it does NOT find the files to include ONLY in Live view!!!!
You can see what I am working on at http://www.BilliantlySimple.com but since I cannot use Live view to see the finished result I have to put the code onto the server to see how it is behaving. -
Relative Path for Jquery into Content Editor Web Part
Hi;
I'd add a Content Editor Web Part (CEWP) to a web part zone. I'd edit that CEWP in HTML view and add my script which load Jquery and my question : how to use a relative
path for Jquery :
<SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
Localizable="false" />
<script src="/sites/XXX/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
My code
</script>
RegardsHi;
Firstly, I have used :
<script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
But any result and any change and If I add /Sites/XXX/ : it works correctly ?
My code is :
<SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
Localizable="false" />
<script src="/sites/XXX/Style Library/Scripts/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(displayTitle, "SP.js");
var site;
var context;
function displayTitle() {
//Get the current client context
context = SP.ClientContext.get_current();
//Add the site to query queue
site = context.get_web();
context.load(site);
//Run the query on the server
context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
function onQueryFailed(sender, args) {
alert('request failed ' + args.get_message() +
'\n' + args.get_stackTrace());
function onQuerySucceeded(sender, args) {
$("#layoutsTable table th span").html("Bienvenue sur le site " + site.get_title() + " - Direction Technique");
$("#zz17_V4QuickLaunchMenu ul.root li span:contains('Biblioth')").parent().parent().hide();
$("#zz17_V4QuickLaunchMenu ul.root li span:contains('Listes')").parent().parent().hide();
</script> -
Server-side includes not showing in new DW CS5.5. Any suggestions?
I have used DW for years and years and have never had any problems. I just installed CS5.5 and am not seeing my php includes in the design pane. I've searched the forums but have not found a working answer.
I'm editing files I've edited in CS5 and earlier with no problem.
I've checked the server-side includes box in the configuration but no change occurs.
Does anyone have any suggestions?What testing server setup do you have? Are you using something like WAMP?
What do you see on screen which tells you the SSIs are not rendering? Any error message? -
"Server-side includes" equivalent in DW CC
I am a long-time HTML coder, having been hand-writing HTML since the days of Mosaic. However, I am a complete newbie with DreamWeaver CC. I have gone through the entire "Bayside Beat" tutorial.
I am used to using "server-side includes" to include common sections of code on all of my pages. For example, I include this at the top of every body:
<!--#include virtual="/inc/banner.inc" --><!--#include virtual="/inc/mainmenu.inc" --><!--#include virtual="/inc/sidebar.inc" -->
and this at the end:
<!--#include virtual="/inc/footer.inc" -->
Following along with the "Bayside Beat" tutorial, I see how to copy those sections from one page to another. However, what happens if I need to make a change in one of those sections?
For example, if I were to add a 6th page, I would need to edit the menu, and then manually propogate that change to every page. Or, next year, when I want to change the copyright to "2014", I again need to manually edit every page.
Is there any way to say "this section is to be identical on every page that includes it, and automatically propogate any changes to all of those pages"?I can't remember when Adobe loused this up. Probably in DW CS6.
My workaround is to create my own SSI code in my Custom Snippets folder. I have one for .shtml/.asp pages and another for .php pages. One click inserts the code.
<!--#include virtual="includes/my-include-file.html" -->
<?php require_once('includes/my-include-file.php'); ?>
Once inserted, click on the include statement in code view and you'll see a small properties box where you can browse to the actual file or Edit the include file. It takes a lot longer to explain than it does to do it. Bottom line, it's quick and you don't need any 3rd party extensions.
Nancy O. -
have used all previous versions of dw. no prior problem with server-side includes. now, they are not showing up in design view. Yes, I have marked preferences to include hidden items/server side includes. any thoughts anyone?
I set up a static test site. It has no testing server defined - just a local site. In that site I have two files -
1. include-test.html
2. /_inc/test.html
Their contents are -
INCLUDE-TEST.SHTML
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<p>This is a test of SSI. The following paragraph is an HTML include -</p>
<!--#include file="_inc/test.html" -->
</body>
</html>
TEST.HTML
<p>Ut aliquip ex ea commodo consequat. Duis aute irure dolor eu fugiat nulla pariatur. Sunt in culpa ullamco laboris nisi quis nostrud exercitation.</p>
When I look at Design view for include-test.html, I can see the contents of the include file, and I can see it listed as a related file below the filename tabs:
So, I'm at a loss.... -
Tabbed panels, Collapsible Panel, and Server Side Include
Hi,
I'm having a problem with the way a Server Side Include inside a Collapsible Panel displays.
Here is how this particular page is set up.
The page has spry tabbed panels.
>>A panel has one overall Collapsible panel (the main product tab)
>>>>Nested in that Collapsible panel are four other collapsible panels (Overview, Features, Screenshots, What's New).
>>>>>>In each of these four collapsible panels is a server side Include that features that category's content
E verything works fine as far as opening and closing is concerned. However, the problem is with the display. The content panel doesn't resize with the Include content, and therefore, the Include content extends outside the border of the content panel.
I'm thinking this is because it is Include content rather than normal content. Is that right?
Do I fix this by changing the overflow value of one the Tabbed Panel CSS styles? If so, which one should I change, and to what value?
Or if that's not how to fix it, can anyone tell me how?
Thanks a lot,
MikeHi, I'm using the latest version of Spry. I modified some CSS rules of the tabbed panels, but not the javascript file. I didn't do anything to the Collapsible Panel rules.
Since first posting this thread, I changed the overflow of the Tabbed Panels Content Group CSS rule to "scroll". That did produce a scroll, but I'd much rather have the panel expand. So, I changed it back the way it was.
Here's the page I'm working on. Click the Court Solutions tab to get to the problem panel.
http://www.ptssolutions.com/Test/public_safety_products_3.shtml
It has different results in IE and FireFox, but doesn't work correctly in either.
Thanks a lot for all your help,
Mike -
Displaying server-side include in DW8
Sorry if this has been asked before? I did search and
couldn't find it (this site is painfully slow and searching is
worse)
I am trying to figure out how to make DW8 show my server-side
include files in the design view. My site uses SSI for all headers
and footers, so every page has at least 2 SSI's. They show up as
the SSI mark on the page, but not the code or graphical
representation of what is in the SSI. I need to have that code
snipet show up in my design view. The only way I have been able to
figure out how to do it, is to reinsert the SSI again from the
menu, and then delete it. Doing it that way, the original ssi that
is listed on the page will display graphicly in the design view.
I do have the option in the preferences - Invisible Elements
- Server-Side includes: and the check box is checked / enabled.
If I could, while I'm here, one other question. I have DW
code rewriting turned on, and it shows me each time I open a file,
what corrections it has made. But if I save the file, and then open
it again, it shows me the exact same corrections being done again.
Is there a trick to make DW8 save the corrections it automatically
makes to the files?
many thanks in advance.> I know that there were major changes between 4 and 8.
One of which was tightening the tolerance for bad code. CS3
is very strict
about displaying proper code.
However, your fragments below look OK.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"mmdlcab" <[email protected]> wrote in
message
news:[email protected]...
>
quote:
Originally posted by:
bregent
> Do any of your included files include html, head or body
tags? If so,
> that's
> the problem. Having those creates invalid html which DW
will not
> render.
>
> Thats a great thought, but I just checked, and no, none
of those tags are
> in
> the files. I'll see if I can attach the code for the 2
files and see if
> that
> helps any. The header file does have my menu system
pasted into the text
> of
> the include file, but that has not caused problems
previously. FWIW, this
> worked fine in DW4 which is what I upgraded from. In
version 4, the
> headers
> and footers showed up fine in desgin view. I know that
there were major
> changes between 4 and 8.
>
> Header include file:
> ----------------------------
> <table border="0" align="center" width="750"
height="110">
> <tr>
> <td><a href="/index2.html"><img
src="/images/color_logo.gif"
> width="110"
> height="107" alt="MMDL Logo" border="0"
/></a></td>
> <td align="center" valign="middle"><a
href="/index2.html"><img
> src="/images/header4.gif" width="450" height="110"
border="0" alt="MMDL -
> The
> worlds largest steel tip dart league"
/></a></td>
> <td align="center" valign="middle"><a
href="testpage.html"></a><a
> href="
http://www.dmisports.com/darts_main.html"><img
> src="/images/dmilogo_small.gif" alt="DMI Sports"
width="110" height="77"
> border="0" longdesc="
http://www.dmisports.com"
/><br />
> <!-- <a href="
http://www.mmdl.org/dmi_flyer.pdf"
> target="_blank">League Board
</a></td>-->
> </a><a href="
http://www.mmdl.org/dmi_flyer.pdf">League
Board </a></td>
> </tr>
> </table>
> <!-- DHTML Menu Builder Loader Code START
--><script language="JavaScript"
> type="text/javascript">
> var navVer = navigator.appVersion;
> if(navVer.substr(0,3) >= 4)
> if((navigator.appName=="Netscape") &&
(parseInt(navigator.appVersion)==4))
> {
> document.write('<' + 'script language="JavaScript"
type="text/javascript"
> src="
http://www.mmdl.org/dmbmenu/nsmenu.js"><\/script\>');
> } else {
> document.write('<' + 'script language="JavaScript"
type="text/javascript"
> src="
http://www.mmdl.org/dmbmenu/iemenu.js"><\/script\>');
> }</script>
> <!-- DHTML Menu Builder Loader Code END
--><table border="0" width="550"
> height="110">
> -------------------------------------
> footer include file
> --------------------
> <table border="0" align="center">
> <tr>
> <td width="20" valign="top"
align="center"> </td>
> <td align="center" valign="middle" width="194">
> <div align="left"><a
href="mailto:[email protected]?subject=MMDL
> Darts.*..
> ">Comments? Email us</a></div>
> </td>
> <td align="center" valign="middle"
width="128"><a
> href="
http://www.mmdl.org/dmbmenu/textmenu.html">Text
> based menu</a></td>
> <td align="center" valign="middle"
width="223">© <SUP>SM</SUP>
> 2007
> Minute Man Dart League. All rights reserved.</td>
> </tr>
> </table>
> -----------------------
>
>
>
> -
htaccess file code lets server parse server side include
.shtml as .html with this:
AddType text/html .html
AddHandler server-parsed .html
it makes me happy so i can continue using .html extensions on
all pages.
however, same server side include statement in .php pages is
not recognized.
what do i need to add to htaccess file so ssi in .php pages
to be recognized??
(not php code in an html page but pure php extension; i.e. i
want to use the same ssi
for header used in .html pages to be in .php pages.)
browsed to find this answer but must not be using correct key
words as have found every
answer but this one.
thanks.Hmmm... include() does not behave this way, the script will
continue
regardless. Be sure to have an appropriate include_path
setting as well.
Be warned that parse error in included file doesn't cause
processing
halting in PHP versions prior to PHP 4.3.5. Since this
version, it does.
http://www.php.net/manual/en/function.include.php
John Waller escribió:
> "thanks for the tip. for anyone who finds this thread,
this works:
> the include statement for a .php page:
> <?php include("test.txt"); ?>"
>
>
> Use the require() function instead of include(). Both
handle includes
> the same but handle errors differently.
>
> Include functions keep running when they encounter
errors-not good for
> the developer because you may not know anything is wrong
until long
> after you've written the script or the site has gone
live.
>
> Require functions stop dead in their tracks until errors
are fixed-which
> is good for you the developer to know about. When
require works you know
> the code and the file names and paths are correct.
>
> Scripts should not continue executing if files are
missing or misnamed
> so require is preferred.
>
>
http://www.w3schools.com/PHP/php_includes.asp
>
>
http://www.tizag.com/phpT/require.php
> -
Server Side Includes and Javascript
Can one safely include javascript in a server-side include
(SSI) file? It seems to work but don't know if it will create
problems down the line. I am using a roll-over navigation bar
created and generated in Fireworks. It seems to defeat the purpose
of using SSI if you can't include the javascript since if there was
a change at some point to the navigation bar you would have to
change the javascript that went with it. And it is nice to keep all
that extra coding out of every file on the site. IS there an
official word on this or some process in creating a SSI file that
could prevent any problems?
You can see the file I created using this at
http://www.hopkinsandporter.com/test.shtml> Can one safely include javascript in a server-side
include (SSI) file?
Yes, but it makes your parent page's derived code messy.
> I am using a
> roll-over navigation bar created and generated in
Fireworks.
This is a big mistake for so many reasons.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"TSemmes" <[email protected]> wrote in
message
news:e52id2$pt1$[email protected]..
> Can one safely include javascript in a server-side
include (SSI) file? It
> seems
> to work but don't know if it will create problems down
the line. I am
> using a
> roll-over navigation bar created and generated in
Fireworks. It seems to
> defeat the purpose of using SSI if you can't include the
javascript since
> if
> there was a change at some point to the navigation bar
you would have to
> change
> the javascript that went with it. And it is nice to keep
all that extra
> coding
> out of every file on the site. IS there an official word
on this or some
> process in creating a SSI file that could prevent any
problems?
>
> You can see the file I created using this at <a
target=_blank
> class=ftalternatingbarlinklarge
> href="
http://www.hopkinsandporter.com/test.shtml">http://www.hopkinsandporter.co
> m/test.shtml</a>
>
Maybe you are looking for
-
I have one Iphone, and two computers. They both have different purchases on them. One is older than the other. and one was my moms. How do i get the ringtones off of my computer and onto my moms computer to use all of them on my Iphone?
-
Can't change clip duration Motion 5
I have tried all of the work arounds I have been able to find in the Support Commnity and still I can't change the duration of source clips in Motion 5. I have trashed plist, rebooted, repaired permisions, changed timing of project, changed name of
-
Error in SOAP - SOAP scenario.
hi, if you have configured the channel properly then check: 1.Whether that channel is active or not in ID. 2.Whether that channel is started in communication channel monitoring in RuntimeWorkbench. 3.Whether that adapter is active or not in adapter m
-
Hi, I'm tying to make the example in the XMLP 561 user guide Chaptr 10 page 49. The things I changed are in the bursting cfg file, <?xml version="1.0" encoding="UTF-8"?> <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <
-
Upgrading phone but keeping existing T-Mobile plan
I have a 3 year old iPhone 4s which has reached the end of its lifespan and am looking at upgrading to an unlocked iPhone 6. I realise that the SIM card will not fit as I need a nano size; my question is should I request a new SIM am I going to lose