Forums

PHP

This topic is locked

Showing Certain regions? I think

Posted 16 Nov 2003 20:19:08
1
has voted
16 Nov 2003 20:19:08 Jonathan Manning posted:
lo people,

I have made a page that has links to various news articles, when a user click the link they are taken to news.php in the form of: www.whatever.com/news.php?nid=2, everythings work ok on that side.

What I want to do is this, create a news page using the same news.php document, so if a user clicks News Archive they are taken to news.php and they see all news items in descending order, but they can still click on standalone news links to see just the one news item at a time. Is this possible using Dreamweaver MX? I thought it might be something to do with Showing Regions but everything I have tried isn't working.

Any help appreciated.

Jon

Replies

Replied 18 Nov 2003 16:28:06
18 Nov 2003 16:28:06 Phil Shevlin replied:
There's an extension out there called "advanced conditional regions" It might work for php...

If I understand you you want one page that both displays all items (if no specific one was selected) and displays details on one (if one was selected)??

Not sure why, but a simple way might be to...

1. Make both pages -- separately -- and get them working properly. Leave out the graphic/layout stuff -- just a plain white page. (lets call them inc_article.php and inc_list.php)

2. Remove the [html], [head] and [body] tags.

3. Then build an empty page following your style/layout. Leave the spot where you want this content - empty.

4. Now just use and if/else statement to include the proper page. Place it in the spot where you want it to appear.

<pre id=code><font face=courier size=2 id=code>
&lt;?php
if (isset($_GET("nid")) {
include 'inc_article.php';
} else {
include 'inc_list.php';
}
?&gt;
</font id=code></pre id=code>
Replied 18 Nov 2003 21:19:37
18 Nov 2003 21:19:37 Jonathan Manning replied:
Thanks for the reply, for some reason the Conditional Region Extension doesn't work for MX, its probably just for Ultradev, its not installing on my machine <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 19 Nov 2003 03:29:44
19 Nov 2003 03:29:44 Phil Shevlin replied:
I'm only suggesting that extension. You don't need it to do what I said.

BTW its advanced conditional regions:
www.dmxzone.com/ShowDetail.asp?NewsId=553

Reply to this topic