Ask a Question related to Macromedia Contribute General Discussion, Design and Development.
-
glockops #1
Template Headaches (PHP includes & links gettingrewritten)
I know this has been discussed a few times on these forums, but I've yet to
find a solution.
I have several DW Templates that make use of PHP includes - some are relative
('includes/navigation.inc.php') some are absolute paths
('/home/smwc/public_html/includes/footer.inc.php'). Whenever a Contribute user
saves a draft or sends a page for review these includes (which are OUTSIDE an
editable region) get rewritten into relative paths.
For example:
The draft will get saved in domain.com/MMWIP/randomstring/randomstring.php
Code before the draft is saved will be:
<?php include('/home/smwc/public_html/includes/breadcrumb.inc.php'); ?>
Code after the draft is published will be:
<?php include('../../home/smwc/public_html/includes/breadcrumb.inc.php'); ?>
Obviously, that breaks everything.
It is also doing this to all absolute paths. Stylesheets go from
src="/scripts/css/style.css" to src="../../scripts/css/style.css"; even the
Template line gets changed to this <!-- InstanceBegin
template="../../Templates/Index-Page.dwt.php" codeOutsideHTMLIsLocked="false"
-->
Path links defined in the template (/about/index.php) get changed to
.../about/index.php and so on..
I was a few weeks from a website launch... * sobs *
Can anyone help with this?
glockops Guest
-
DataGrid Headaches
We have a serious issue when it comes to datagrids in Flex 2 and 3. Our datasource is a simple XML and what we are trying to do is display a... -
ASP.Net Extension Headaches
Something I found useful when working with .NETcontrols for the Ektron CMS application I wanted to rendor Glyphs in design mode but DW7.01 the... -
AutoLoader/inheritance headaches
My package USession inherits from, and only from, CGI::Session. The "flush" method is in CGI::Session and isn't redefined by my class. When I call... -
Template does'nt have correct links after update in Fireworks
If I create a template by including Fireworks HTML (everything works), and then try to update the template in Fireworks, all the links to the images... -
?Hard links, Soft links, & Aliases--Explain
Hi All, Could some knowledgeable UNIX type please explain the differences between hard links, soft links, and traditional Mac aliases. Responses... -
glockops #2
Re: Template Headaches (PHP includes & links gettingrewritten)
OK, so I've worked on this for a little longer, and here is what I've found.
You apparently cannot use php includes like the one below
<?php include('/home/smwc/public_html/someinclude.php'); ?>
where you include a file from the server's root path.
You can however, use an include like the one below (which does the same thing)
<?php include($_SERVER['DOCUMENT_ROOT'].'someinclude.php'); ?>
I am however, still having a problem with referencing images, stylesheets, and
links that start at the domain's root - example -- /index.php
Contribute still turns a link (to anything) that starts with a ' / ' into a
relative path; resulting in ../../index.php
I really didn't want to specify a domain for the resource, because we will
soon be changing domain names (parallel development server) - but it looks like
I'm going to have to anyway...
Why can't Contribute just leave links starting with a forward slash alone!!!
glockops Guest
-
Connor Doyle #3
Re: Template Headaches (PHP includes & links gettingrewritten)
glockops:
I am finishing up my first deployment of Adobe Contribute CMS for one of my
clients, and I was having the same problem with PHP require(). I found the
following article on the Adobe KB that contains our solution:
Article: "Document relative paths pointing to items located in the Templates
folders are rewritten in new pages created from templates"
[url]http://kb.adobe.com/selfservice/viewContent.do?externalId=52195a7[/url]
In the .dwt, you must surround the paths in question with a proprietary syntax
which causes them to be treated as literals instead of Template Parameters,
like so:
<?php include("foo.php"); ?>
becomes:
<?php include("@@('foo.php')@@"); ?>
This technique also works for any other type of relative paths to external
resources such as images, scripts, stylesheets, etc.
All the best,
--
Connor Doyle
One Orange Software
Connor Doyle Guest
-
xjpattx #4
Re: Template Headaches (PHP includes & links gettingrewritten)
My main concern is with seeing all these complaints about this cms program why
not just switch to another? It seems like alot of people are having problems
with it...not to take away from contribute because i tried it out but had many
problems as well....
xjpattx Guest
-
jcroentgen #5
Re: Template Headaches (PHP includes & links gettingrewritten)
<<My main concern is with seeing all these complaints about this cms program
why not just switch to another? It seems like alot of people are having
problems with it...not to take away from contribute because i tried it out but
had many problems as well....>>
And what program would you suggest for a Mac platform?
jcroentgen Guest
-
glockops2 #6
Re: Template Headaches (PHP includes & links gettingrewritten)
[q]Originally posted by: xjpattx
My main concern is with seeing all these complaints about this cms program why
not just switch to another? It seems like alot of people are having problems
with it...not to take away from contribute because i tried it out but had many
problems as well....[/q]
Yeah, I didn't mean to sound tiffy... Contribute is working out rather well.
It's really simple for end-users to understand so that makes my job a lot
easier. And it's better than anything else that I've found so far. It just
does its occasional weird thing - I'll live with that if the rest of it works.
Thank you Connor! I'm sure that will come in handy!
FYI - couldn't use my original account so glockops2 it is.
glockops2 Guest
-
xjpattx #7
Re: Template Headaches (PHP includes & links gettingrewritten)
well wit me i just create my site in photoshop....send it to dreamweaver ...and
then i have a cms that i have that makes it real easy to make it to a website
....( i don't want to say what cms because it's not like i'm trying to advertise
for them or anything) but yea it's real easy to do that ...some companies out
there that do that is like reddot, interwoven, contentivity, and lots more just
go on google or something and type cms and you'll get alot ....like i said i
tried contribute but wasn't very satisfied with the outcome of the product but
try, especially if your with a bigger company working on their website, another
cms.
xjpattx Guest



Reply With Quote

