# Does Dreamweaver have any command line switches?



## Chris_E (Feb 16, 2006)

Hi

My single DW template file holds a chunk of Javascript using a series of text 'messages' that are used to populate a scrolling news bar on all pages of my site.

An example message line looks like this:


```
msg += '<div class="element"><a href="../news/090908.html"><span class="date">9th September 2008</span>Fashion Show - Advance Notice</a></div>'
```
My administrator will need to update these messages on a weekly basis and (as you might see from above) the potential of corrupting the template by him/her missing off string elements or messing up a " mark when manually editing in the message is too high to risk!

I have written small VB app that reads in the messages from the template file and allows the administrator to rapidly modify that content, then storing a modified template with the new messages in it. This works fine.

Then, once the changes are complete, the admin has to open DW, open the template and make a micro edit (add a space for example) save it, perform an update and finally full site sync to make the changes take effect.

I'd *really *like to include these DW steps in the VB as command line statements if possible, so the VB is a one stop shop for these message changes.

So, the command line processes must:

- update all files that are dependant on a specified template
- perform a sync of the whole site

Is this possible? Does DW support any command line switches?

Chris


----------



## colinsp (Sep 5, 2007)

I don't believe that DW has any command line switches BUT someone may know better.

This seems to me to be a very complex way of doing what you want. I would have thought that it would be easier and more robust to do this in a serverside language such as PHP. You could store the message in a separate file and have a simple editing window with administrator only access that would add the new content to the file. You could hard code the critical elements in the php code and your admin would just type in the non critical elements. 

IMHO as this is a dynamic element it should not be included in a DW template.


----------



## Chris_E (Feb 16, 2006)

Hi colinsp

Many thanks for your feedback.

I like the idea you have about php but have zero knowlege of the language so wouldn't know where to start on that one.

If anyone would care to help on the code, I'll be truly grateful!

Chris


----------



## colinsp (Sep 5, 2007)

Chris_E,

Sorry I am a noob at php, I have managed to do something similar for one of my sites which is to allow a 'publicity officer' to update a text portion on the opening page of a website, the remainder of the page he cannot touch. This is not your scrolling banner though unfortunately.

It may be worth looking at something like lilcms which is what I used and I added tinymce to it and I now see that the developers have done that.

I added a login form to the front of this to restrict access to only the appropriate person. I used a sample of code from here to achieve this.

This generates a text file that you can do anything with and you may be able to use it to drive your banner. The help and tutorails on these sites got me something up and running that meets our needs. It may be worth a bit of time experimenting.


----------



## Chris_E (Feb 16, 2006)

That's really helpful stuff Colin, thanks!

I will look into them and see how far I get.

best regards

Chris


----------

