Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Displaying an Article

software


Displaying an Article

Next, you create the article detail page: article.php. This page displays the title, the short description, the body, and the publishing date for an article. You build the page in a similar manner to topic.php:

  1. Open article.php and apply the blgtemplate to it.
  2. In the title field of the Document bar, 19519s1820t enter Blog: Article as the title of the page.

Create a filtered advanced recordset called rsArticle that must:



    • filter articles by the id_art field, which must be equal to the value of the URL parameter, id_art

o        make an inner join between the tables blg_topic_top and blg_article_art.

(INNER JOIN blg_topic_top ON idtop_art=id_top)

Figure 20 shows Advanced view of the rsArticle recordset:

Figure 21. The rsArticle recordset in the advanced recordset dialog box

(+) View larger

Display the dynamic data from the recordset in your page. This time, you won't need a dynamic table for that, since there is only one item in the recordset to display-the article ID that the URL parameter passed.

    • Insert a table in the main editable region that has three rows and two columns.
    • Merge the cells of the second row.
    • Merge the cells of the third row.
    • Drag the recordset fields that you want to display from the Bindings panel into the corresponding table cells, as shown in Figure 22. Write the necessary text to make your page more user-friendly.

Figure 22 shows how the article.php page should look in Design view.

Figure 22. The page in Design View

(+) View larger

You can see how easy it is to display dynamic information extracted from the database just by using drag and drop actions.

Save the file and put it to the server. Browse to the index.php page, click a topic to go to the topic page, and click an article title to display the article page with the detailed information for that article.

Now you have all the pages that display postings from the blog:

  • index.php, that lists the most recent 10 articles
  • topic.php, that displays the articles associated to a topic.
  • article.php, that shows the article contents.

There is one issue left: how do you post an article? You will learn to do that in the next section.


Document Info


Accesari: 1343
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )