Forums

This topic is locked

Help - how should I do this?

Posted 14 Mar 2002 23:02:26
1
has voted
14 Mar 2002 23:02:26 Peter Elkjaer posted:
Hello guys.

I am - based on tutorials here and there, trying to build a simple content management system (I'm a newbie with asp).

I am almost done, but I am having one major problems.
On a "which-page-to-update-page" inside the CMS, I have made a recordset containing ID and Title for the textures ind my database, then created a form, a list/menu and a submit button.

But how do I get all my "titles" inside that list/menu, so I can "navigate" the correct page to the online-html-editor-page.

I have tried the "dynamic list/menu" and a "update record", but the menu only shows the first record from my database..why?

Can you please help me?

Kind regards, Peter Elkjær

Replies

Replied 15 Mar 2002 14:40:40
15 Mar 2002 14:40:40 Dennis van Galen replied:
hi Peter,

The easiest way to make such a "select article to update" page is:

- Add a table to your select page, give it 1 row and 2 columns.
- Bind your title field to the right table-cell, the left cell is for the repeat region so that it won't repeat horizontally but vertically.
- Click on this dynamic value and add a "goto detail page" behavior (easiest way) set to which page it should go and tell it to pass the ID to the page.
- Select the entire row and apply repeat region set to all records (make sure it repeats the correct recordset !).

And then we have a basic "select what to update" page, we can build on this by using a table with more columns, one reading Update and one reading Delete, setting them to do the appropriate actions then we also place a link to a "insert new article" page and we have a admin section consisting of a single page for this range of articles.

There's no need to go confusing yourself with forms and dynamic lists for a page which does basically nothing but redirect you to a "update page" while giving the page a parameter on which the "update page" needs to filter the article recordset.

With kind regards,

Dennis van Galen
Webmaster KPN Services
Financial and Information Services

Edited by - djvgalen on 15 Mar 2002 14:41:54
Replied 15 Mar 2002 14:58:47
15 Mar 2002 14:58:47 Dennis van Galen replied:
To be complete, here's the same using the dynamic menu.

- You allready have your form with a menu inserted, click on the menu and go to the server behavior panel, scroll all the way down to dynamic elements and select a dynamic list/menu from the sub-menu.
- A requester pops up, here we select the record set with titles and ID's, we select the proper menu in "menu" then we set "get labels from" to our Title field and "get values from" to our ID field and we leave "select value equal to" empty.
- Press ok, click inside your form and look at your property inspector, in "Action" use the folder to navigate to your "update" page and set to "POST" for providing a URL parameter to your update page to filter the recordset OR set to "GET" to filter the recordset on your update page on a FORM variable, you have to set the recordset filter accordingly, get looks nicer in my opinion.
- Make sure the form-button is set to "submit form" and save your page and try it out.

Oops, i forgot to mention that when using POST you need to set the form action to your update page and giving it a parameter like so:

Name: |Value:
ID | <%=(rsYourRecordSet.Fields.Item("ID".Value)%>

Again, you can alter this to make it into a one page insert / update / delete page.
I recommend trying both these methods so that you get used to the way UDev handles dynamic elements and dynamic data.

Happy developing.

With kind regards,

Dennis van Galen
Webmaster KPN Services
Financial and Information Services

Edited by - djvgalen on 15 Mar 2002 15:10:20
Replied 16 Mar 2002 22:50:39
16 Mar 2002 22:50:39 Peter Elkjaer replied:
Hey Dennis !

Thank you very much for your answer.
It helped me alot <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Best regards,
Peter Elkjær - Denmark

Reply to this topic