This tutorial will guide you through specifying the elements for your views output using Semantic Views : Fields settings. This tutorial assumes you have Views installed.
- Create a view
- Visit the Views administration page
- Click Add new view. Type in the name test_semantic view, select type 'Node', click Next.
- Modify the view to use Semantic Views options
- Locate the Basic settings column, click the Style: settings.
- At the bottom section of this area, you will see a list of options under How should this view be styled. Select Semantic Views, and click Update.
- Click options next to Row style. Select Semantic Views : Fields.
- Select which fields to style
- Click the + icon next to Fields.
- In the Groups drop-down menu select 'Node', then check Node: Body, Node: Post Date and Node: Title. Click Add.
- Under the next three options for Body, Post Date and Title, click Update, staying with the default settings for this tutorial.
- Scroll back up to Fields and click the ↑↓ icon to rearrange fields, so it is Title first.
- Preview the default
- At this stage you can preview the default settings. Click Save.
- View the unstyled fields previewed at the bottom of the Views User Interface.
- Modify the output for these fields
- Click the settings gear icon next to Row style: Semantic Views : Fields.
- Scroll down to the Row style options, you can see the menu built for the fields you have chosen Title, Body and Post date.
- Do not capitalize the elements and do not use <> symboles to specify the elements in the form.
- Under Ttitle specify the element: h3. Optional: You can also edit your settings and specify custom Class attributes. put spaces in between each class attibute, and do not wrap class attributes in "double quotes".
- Under Body specify the element div. You are likely to have other block level elements such as a paragraph or blockquote.
- Under Post date specify the element p.
- Select Skip empty fields
- Click Update.
- Click Save to save your settings.
- You're done! You should see the modifications to your view when you preview it.