HighDots Forums  

Sitewide constants / variables

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Sitewide constants / variables in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
SnakEyez02
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-18-2008 , 05:54 PM






Are you saying you want to define something like Macros in Dreamweaver?

Or looking at this further, if you need to change something you could use the
Find and Replace function. That would search through the source code of your
pages to change references. This is basically the same function you would use
in Word.

What Murray is trying to say is that it doesn't matter what tool you use when
it comes to things like variables in pages. HTML is the same in Expression Web
as it is in Dreamweaver, and as it was in Frontpage and GoLive. HTML is a
static language that cannot produce dynamic content like that on its on. The
example of PHP was given because it is a common language. There is also ASP.


Reply With Quote
  #32  
Old   
Powermonger
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-18-2008 , 07:32 PM






Things like templates with their repeating regions were devised just in order
to prevent copying and changing the same things at many places throughout the
site. Pity the same simple mechanism doesn't exist for simple text
substitution.

To learn PHP just to be able to substitute page titles and similar things is a
kind of overkill, as I have already noted before. Moreover, PHP may still not
be available everywhere, and if you would move the site to Windows hosting,
will you learn ASP and do Search & Replace again to change everything? If DW
has what I suggested, nothing of this would be necessary.

Quote:
I'm not sure why you're being so argumentative about it. These are all
opinions. You think it should do this. No one else does. That's OK.
Sure, Darrel, these are opinions. If you think that people should either learn
PHP/ASP or do excessive Search & Replace every time they change their
web/company name, just think it. I think that programs should have such simple
functions helping people without forcing them to do things they dont want to
do.

BTW, I dont understand why YOU are so argumentative against the idea. Your
wording ("You think it should do this. No one else does.", "DW has no
intention" etc.) sounds like if you had the ambition to speak for all present
and future DW users and DW developers alike. I would be more careful here.

Quote:
What you are describing is a content management system that, in turn,
scripts out flat/static HTML files.
My God, what these simple substitutions have to do with a CMS?? :-)



Reply With Quote
  #33  
Old   
Powermonger
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-18-2008 , 07:32 PM



Things like templates with their repeating regions were devised just in order
to prevent copying and changing the same things at many places throughout the
site. Pity the same simple mechanism doesn't exist for simple text
substitution.

To learn PHP just to be able to substitute page titles and similar things is a
kind of overkill, as I have already noted before. Moreover, PHP may still not
be available everywhere, and if you would move the site to Windows hosting,
will you learn ASP and do Search & Replace again to change everything? If DW
has what I suggested, nothing of this would be necessary.

Quote:
I'm not sure why you're being so argumentative about it. These are all
opinions. You think it should do this. No one else does. That's OK.
Sure, Darrel, these are opinions. If you think that people should either learn
PHP/ASP or do excessive Search & Replace every time they change their
web/company name, just think it. I think that programs should have such simple
functions helping people without forcing them to do things they dont want to
do.

BTW, I dont understand why YOU are so argumentative against the idea. Your
wording ("You think it should do this. No one else does.", "DW has no
intention" etc.) sounds like if you had the ambition to speak for all present
and future DW users and DW developers alike. I would be more careful here.

Quote:
What you are describing is a content management system that, in turn,
scripts out flat/static HTML files.
My God, what these simple substitutions have to do with a CMS?? :-)



Reply With Quote
  #34  
Old   
SnakEyez02
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-18-2008 , 09:04 PM



A company changing a name is a lot of work. It shouldn't be a simple one-step
process. Obviously there is a reason why the name changes and name changes
with a company don't happen every day. There are legal papers to go through,
copyrights and patents to go through and all kinds of other documentation.
Dreamweaver was not meant to have your company change names constantly.

Now I'm not saying this is the case with your company but you can see the
issue. Hence, here are some common practices I can recommend. When naming
images, don't name them with your company. Instead name them with a name that
is representative of their location (ie: logo.jpg, banner.gif, navbar.gif,
etc.). This way you can create new images with the same name and swap out
easily. Then as far as page titles and content are concerned, doing a Search
and Replace is more than sufficient.

If you are just changing the company name, yes I will agree with you that
learning and using a scripting language here is overkill if you were not using
it before.

The way you were asking it originally just cannot be done with DW. You cannot
put another language inside of a web page because the webpage is coded in HTML.
This is not a Word document that is shared between programs. The purpose of
the HTML language was to provide a common language that developers could pull
from. Thus in the eyes of many it would be illogical to put in extra code for
the program to parse. By adding more functions as you suggest it would
increase the delay of previewing a page, and prevent live viewing because the
page would need the variables filled in before it could go live. Then if there
were server-side scripting involved, it would create an extremely high load on
the web developer.

Hopefully this explains a little more as to why something like this is not in
DW and why it will probably never be in this program, or any other web
developing program for that matter.


Reply With Quote
  #35  
Old   
SnakEyez02
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-18-2008 , 09:04 PM



A company changing a name is a lot of work. It shouldn't be a simple one-step
process. Obviously there is a reason why the name changes and name changes
with a company don't happen every day. There are legal papers to go through,
copyrights and patents to go through and all kinds of other documentation.
Dreamweaver was not meant to have your company change names constantly.

Now I'm not saying this is the case with your company but you can see the
issue. Hence, here are some common practices I can recommend. When naming
images, don't name them with your company. Instead name them with a name that
is representative of their location (ie: logo.jpg, banner.gif, navbar.gif,
etc.). This way you can create new images with the same name and swap out
easily. Then as far as page titles and content are concerned, doing a Search
and Replace is more than sufficient.

If you are just changing the company name, yes I will agree with you that
learning and using a scripting language here is overkill if you were not using
it before.

The way you were asking it originally just cannot be done with DW. You cannot
put another language inside of a web page because the webpage is coded in HTML.
This is not a Word document that is shared between programs. The purpose of
the HTML language was to provide a common language that developers could pull
from. Thus in the eyes of many it would be illogical to put in extra code for
the program to parse. By adding more functions as you suggest it would
increase the delay of previewing a page, and prevent live viewing because the
page would need the variables filled in before it could go live. Then if there
were server-side scripting involved, it would create an extremely high load on
the web developer.

Hopefully this explains a little more as to why something like this is not in
DW and why it will probably never be in this program, or any other web
developing program for that matter.


Reply With Quote
  #36  
Old   
Powermonger
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-19-2008 , 06:17 AM



Originally posted by: SnakEyez02
A company changing a name is a lot of work. It shouldn't be a simple one-step
process. Obviously there is a reason why the name changes and name changes
with a company don't happen every day. There are legal papers to go through,
copyrights and patents to go through and all kinds of other documentation.
Dreamweaver was not meant to have your company change names constantly.

:-))) Well, are you suggesting that changing company name should be tedious in
a webdesign tool, because it is difficult in dealing with authorities?
Interesting idea... :-))

Quote:
Then as far as page titles and content are concerned, doing a Search and
Replace is more than sufficient.

And what about the menu appearing on every page? After all, we could insert
and change it with Search & Replace, too... :-)

Quote:
By adding more functions as you suggest it would increase the delay of
previewing a page,
and prevent live viewing because the page would need the variables filled in
before it could go live.

:-) Can you notice a milisecond delay?
And DW already has template parameters, which (if used) prevent what you call
"live viewing", because they must be filled before.

Quote:
Hopefully this explains a little more as to why something like this is not in
DW and
why it will probably never be in this program, or any other web developing
program for that matter.

Oh really? For example, in Netobjects Fusion, you can define text variables
which do exactly what I discuss here.



Reply With Quote
  #37  
Old   
Powermonger
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-19-2008 , 06:17 AM



Originally posted by: SnakEyez02
A company changing a name is a lot of work. It shouldn't be a simple one-step
process. Obviously there is a reason why the name changes and name changes
with a company don't happen every day. There are legal papers to go through,
copyrights and patents to go through and all kinds of other documentation.
Dreamweaver was not meant to have your company change names constantly.

:-))) Well, are you suggesting that changing company name should be tedious in
a webdesign tool, because it is difficult in dealing with authorities?
Interesting idea... :-))

Quote:
Then as far as page titles and content are concerned, doing a Search and
Replace is more than sufficient.

And what about the menu appearing on every page? After all, we could insert
and change it with Search & Replace, too... :-)

Quote:
By adding more functions as you suggest it would increase the delay of
previewing a page,
and prevent live viewing because the page would need the variables filled in
before it could go live.

:-) Can you notice a milisecond delay?
And DW already has template parameters, which (if used) prevent what you call
"live viewing", because they must be filled before.

Quote:
Hopefully this explains a little more as to why something like this is not in
DW and
why it will probably never be in this program, or any other web developing
program for that matter.

Oh really? For example, in Netobjects Fusion, you can define text variables
which do exactly what I discuss here.



Reply With Quote
  #38  
Old   
darrel
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-19-2008 , 10:20 AM



Quote:
To learn PHP just to be able to substitute page titles and similar things
is a
kind of overkill
You don't have to 'learn PHP'. See my other reply. It's two lines of code.
Cut and paste.

Quote:
Moreover, PHP may still not
be available everywhere
You're going to find that nearly every server can support PHP. If not PHP,
then ASP/ASP.net, both which can be utilized for what you want with a
minimum of actual code. (2 or 3 lines).

If you know what your server supports, let us know and we can give you some
samples.

Quote:
Sure, Darrel, these are opinions. If you think that people should either
learn
PHP/ASP or do excessive Search & Replace every time they change their
web/company name
They don't need to learn that. There's search and replace, and then there's
cutting and pasting of a couple lines of code.

I think you're making this out to be harder than it actually is. ;o)

Quote:
What you are describing is a content management system that, in turn,
scripts out flat/static HTML files.

My God, what these simple substitutions have to do with a CMS?? :-)
It is exactly what you are describing...static pages with variables that
then can be post-processed to swap out the variables for actual text and
then published as static HTML files. That is one (of many) models for a CMS.

-Darrel




Reply With Quote
  #39  
Old   
darrel
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-19-2008 , 10:20 AM



Quote:
To learn PHP just to be able to substitute page titles and similar things
is a
kind of overkill
You don't have to 'learn PHP'. See my other reply. It's two lines of code.
Cut and paste.

Quote:
Moreover, PHP may still not
be available everywhere
You're going to find that nearly every server can support PHP. If not PHP,
then ASP/ASP.net, both which can be utilized for what you want with a
minimum of actual code. (2 or 3 lines).

If you know what your server supports, let us know and we can give you some
samples.

Quote:
Sure, Darrel, these are opinions. If you think that people should either
learn
PHP/ASP or do excessive Search & Replace every time they change their
web/company name
They don't need to learn that. There's search and replace, and then there's
cutting and pasting of a couple lines of code.

I think you're making this out to be harder than it actually is. ;o)

Quote:
What you are describing is a content management system that, in turn,
scripts out flat/static HTML files.

My God, what these simple substitutions have to do with a CMS?? :-)
It is exactly what you are describing...static pages with variables that
then can be post-processed to swap out the variables for actual text and
then published as static HTML files. That is one (of many) models for a CMS.

-Darrel




Reply With Quote
  #40  
Old   
darrel
 
Posts: n/a

Default Re: Sitewide constants / variables - 06-19-2008 , 10:32 AM



Quote:
Oh really? For example, in Netobjects Fusion, you can define text
variables
which do exactly what I discuss here.
And that is a CMS using that 'variable, search & replaec, then publish'
metaphor.

Again, it's rarely used or needed these days BECAUSE of server side
languages. It's kind of an antiquated model (though it still has its uses,
admittedly). DW simply isn't targetting that particular need. It's really a
text editor for people to write their own HTML with PHP or ASP or the like.

The more you are describing your need, the more it sounds like you are
actually looking for Server Side Includes at the basic level, or, on a
slightly more complex (I stress SLIGHTLY more complex) a wee bit of PHP or
ASP.

-Darrel




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.