Welcome to TalkGraphics.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2009
    Location
    Jacksonville, Florida, USA
    Posts
    47

    Default WD6 Plus Dynamic Content

    I am building a public website with about 20 pages. 19 of those are static with images and content, perfect for WD6 (which I want to use). The Home page, however, is required to have some dynamic content whereby the client wants the ability to update 3 text areas with content as and when required. Being a .Net developer, I would typically expect to do that with an .aspx page tied to a backend database, in which I would give the client normal create, retrieve, update and delete (CRUD) capabilities.

    My question: Does anyone on the Forum have any suggestions (or experience) for doing that, i.e., marrying WD6 created pages with another page containing dynamic content in one website? I'm not tied to using .Net. I've used Web Expression for creating sites like this in the past, but it is sooo much easier (and more fun) using WD6.

  2. #2
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: WD6 Plus Dynamic Content

    You can use a placeholder to add server side code to your webpage. You could then include another page or call a function to display dynamic content on it. You might want to check out the dynamic page tweek so the page stretches vertically and moves the footer down automatically.

  3. #3
    Join Date
    Aug 2002
    Location
    A little french village east of Dallas, TX called Forney And now Austria and Germany too
    Posts
    1,053

    Default Re: WD6 Plus Dynamic Content

    If it were me, I would create scrollable Iframe placeholders on your web page in the correct size. Then I would create separate web pages with or without XD6 (but using block html text if you do use XD6) and allow your users CMS access to those pages.

    Eric
    I'm never wrong. I thought I was wrong once but it turns out that I was mistaken.
    Web Templates. My Beginner Video Tutorials
    My Club. My Album.
    My Other Album. My Tutorial.

  4. #4
    Join Date
    Feb 2008
    Location
    Melbourne
    Posts
    156

    Default Re: WD6 Plus Dynamic Content

    Hi,

    In the past i have created web designs using the exact same scenario.

    Here's an old site I did that contains a gallery i wrote in php pulling records from the database.:

    http://www.redhotfishingcharters.com...ws_rsImages=95

    All i did was create the site, use a big placeholder in WD and inserted my custom php code and connection records in the header.

    I must say though I only use this method in extreme cases as I prefer to hand code web sites in Dreamweaver, still it works.
    I ate my crayon.

  5. #5
    Join Date
    Aug 2008
    Location
    Canton, GA
    Posts
    666

    Default Re: WD6 Plus Dynamic Content

    Same here as JaffDave. Most recently I was actually requested to do the site in Xara, which was a redesign of someone else's making, bu tto be executed within Xara (Xtreme 5 Pro in this case). They wanted to be able to update the front page of the site in the right sidebar without a lot of hassle and having to bother me every time.

    So, as above, I created a small MySQL database on the hosting account (which you should learn to do if you don't know how - this can radically expand how many things you can offer clients). I created an HTML form on an admin page (which is secured, which you should also learn to do as another option to add to their site) that updates two fileds in a table in the DB - the title and the description.

    Finally, I created an HTML placeholder with a little bit of html with interspersed php to excho out the stuff from the table.

    If you want more detailed information, let me know.

  6. #6
    Join Date
    Apr 2009
    Location
    Jacksonville, Florida, USA
    Posts
    47

    Default Re: WD6 Plus Dynamic Content

    Thanks for your input, JaffDave and slavelle. Although I am comfortable with SQL (I assume MySQL and SQL 2005 are fairly similar in functionality and usage) and HTML, I've never worked with php, so I'd appreciate just a little more info.

    What code do you use on the secured admin page along with the form HTML to update the database; is that php? Can I use other code, such as server side C#? Same question about displaying the info back to the page from the database. Finally, do you include the entire admin page(s) in the WD6 Placeholder? I guess I'm wondering how that works. If there is a code example out there somewhere, I'd love to see it.

    When I can't use WD6, I also use MS Web Expression (fairly close to Dreamweaver) to build my websites, but I so prefer to use WD6, especially when most of the content is static.

    Thanks much.

  7. #7
    Join Date
    Oct 2003
    Location
    Reading, United Kingdom
    Posts
    168

    Default Re: WD6 Plus Dynamic Content

    First off start your secure page with something like the following at the top:
    Code:
    <?php 
    if (!$_SERVER['HTTPS'] == 'on'){
      header("Location: https://www.mydomain.com".$_SERVER['PHP_SELF']);
    }
    ?>
    That will cause the web server to use secure sockets. It is important that the php tag is the very first line of the file, or the headers will already have been sent and you will get an error.

    After that you can just write normal html up to the point you need your dynamic data. There you open a php tag "<?php" query the database and use "echo" to send the result to the client, close the tag "?>" and drop back into html. Posted form variables are available in an array $_POST['myvar'], and those sent in the URL - format: "myfile.php?myfirstvar=foo&mysecondvar=bar" - are available in $_GET['myvar']. You can go back and forth between html and php as often as you like within a file, but it can get a bit difficult to understand your own code if you overdo it!

    The php manual at php.net is comprehensive and generally easily understood, but I know a few people who've been caught out by not realising that one blank line at the start of the file is enough to break setting the secure header, or setting a cookie for that matter.

  8. #8
    Join Date
    Aug 2008
    Location
    Canton, GA
    Posts
    666

    Default Re: WD6 Plus Dynamic Content

    Good summary jwhitham. For security (not https, rather login), I've been using a script called vAuthenticate (http://www.beanbug.net/vScripts.php). It's not perfect, but it definitely works. There are a number of free ones out there that do more, but I've gotten kind of used to this.

    I have generally built the things I've needed like this as standalone php pages that get loaded into an iframe which is in the xara placeholder area. This way, I can use whatever programming editor I want and don't have to copy stuff back and forth in the code window iwthin Xara - and if I ever need to make changes to that part of the site, I can do so without having to do anything to the Xara file - makes changes faster and easier and less disruptive.

    I don't know how the c# stuff works, but if it's a server side script and is supported by your host, great. php is very well integrated into html, so it's a natural fit, and if you already know any programming, I'm sure you could "get" php. I'm a novice at best, but I've managed to get several login sites with database populated pages without removal of too much hair.

    Hope this helps.

  9. #9
    Join Date
    Apr 2009
    Location
    Jacksonville, Florida, USA
    Posts
    47

    Default Re: WD6 Plus Dynamic Content

    OK, you've convinced me. I've thought for a while that I need to "get" php, especially since I have a couple of Wordpress sites in my portfolio, so I'll take the time now to learn it at php.net. Thanks for the input.

  10. #10
    Join Date
    Oct 2003
    Location
    Reading, United Kingdom
    Posts
    168

    Default Re: WD6 Plus Dynamic Content

    I seem to have misinterpreted the term secured here.

    Anyway, attached are 2 very simple, maybe too simple, files showing embedding a form in one, and php in the other using placeholders. And here is a link http://www.john.whitham.me.uk/simpleform.html to prove that it works. I renamed the html file to a php extension in the second, but that is not strictly necessary on most web servers.
    Attached Files Attached Files

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •