My First DW Anything Studio Document
Ответ
The following section describes how to develop the document displaying the standard Joomla! article text along with its title.
Prerequisites
Make sure you have at least one article created in your Joomla! Content Manager.
Defining a Dataset
First of all we should specify how to retrieve data from database. DW Anything Studio dataset will do the job.
-
Go to the Datasets list and click New to create a dataset.
-
Enter the following dataset parameters.
-
Click Save and Close.
-
DW Anything Studio takes you to the Add Dataset Query form to define an SQL query to fetch data from database.
-
Enter the following query parameters
Table B.2. Query parameters
Parameter Value Description Parent query root
This is a top-level query Query name article
The article data will be stored as the article
variable. Remember the query name must be alphanumericQuery source SELECT title, introtext FROM #__content LIMIT 1
We want to get title and intro text for a single article from database Single row yes
The single row of data will be stored as a variable -
Click Save & Close.
Defining a Template
-
Go to the Templates list and click New to create a template.
-
Enter the following template parameters.
-
Click Save & Close.
Defining a Document
-
Go to the Documents list and click New to create a document.
-
Enter the following document parameters.
-
Click Save & Close.
Setting up the Menu Item
In order to access our document form front end, we need a menu item. Let's create it, following the standard Joomla! procedure.
-
Click the Main Menu — Add New Menu Item in the Menus menu of your site's administrator panel. (Note that, depending on your site configuration, there can be no Main Menu item in your Menus menu. If so, select the appropriate menu available from front end.)
-
Type
Tutorial 1 Document
in the Menu Title text box. -
Under the Menu Item Type, click Select.
-
Select DWAnything — DWAnything Document.
-
Select
tutorial_1
in the Document drop-down list box. -
Click Save & Close.
Now you can view your resulting document. Go to front end and click the Tutorial 1 Document menu item.
Добавить комментарий