Content Overview
APD includes a content management system that allows you to create, manage, and display markdown or HTML content within your portal pages.
What is Content?
Content in APD refers to:
- Markdown or HTML text documents
- Stored in Business Central
- Managed through a dedicated interface
- Displayed dynamically in templates
Content vs Templates
| Aspect | Templates | Content |
|---|---|---|
| Purpose | Page structure | Page text/articles |
| Format | HTML with APD tags | Markdown or HTML |
| Contains logic | Yes (loops, conditions) | No (static text) |
| Edited by | Developers | Content creators |
| Storage | APD HTML Template Hgd table |
APD Page Content Hgd table |
Use Cases
Content is ideal for:
- Help articles: User guides and FAQs
- Marketing text: Promotional content
- Terms and conditions: Legal text
- News and announcements: Dynamic updates
- Product descriptions: Catalog content
Content Architecture
┌─────────────────────────────────────┐
│ Portal Page (Action) │
│ │
│ ┌─────────────────────────────────┐ │
│ │ Template (HTML + Tags) │ │
│ │ │ │
│ │ <?content(article-name)?> │ │
│ │ ↓ │ │
│ │ ┌─────────────────────────┐ │ │
│ │ │ Content Document │ │ │
│ │ │ (Markdown/HTML) │ │ │
│ │ └─────────────────────────┘ │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────┘
Content Properties
Each content item has:
| Property | Description |
|---|---|
| Content Name | Unique identifier |
| Language | Language variant |
| Title | Display title |
| Type | Content category |
| Style | Markdown or HTML |
| Security Profile | Access restriction |
| Host Action | Associated action |
| Content | The actual text |
Accessing Content Management
Content List
- Open the Advanced Portal Designer menu page (search for it in Tell Me) and click Content to open the Content List
- View all content items
- Filter by type, language, or security
Creating Content
- Open Content List
- Click New
- Enter content properties
- Click Edit Content to write
Editing Content
- Select a content item
- Click Edit Content action
- Use the Markdown/HTML editor
- Save when finished
Multi-Language Content
Content supports multiple languages:
- Create base content (default language)
- Create variant with specific Language ID
- APD serves appropriate version based on user preference
Language Selection Priority
- User's language preference
- Session language
- Default language (language = 0)
Content Types
Organize content with types:
- Create custom content types
- Filter content by type
- Apply consistent handling
- Group related content
Managing Types
- Open Content List
- Click Content Types action
- Add or manage type codes
Security on Content
Security Profile
Assign a security profile to restrict access:
- Only users with matching profile see the content
- Blank profile = all authenticated users
- Works with the
<?content()?>tag
Host Action
Associate content with an action:
- Content displays in context of that action
- Useful for page-specific content
- Enables proper navigation
The Content Tag
Use the <?content()?> tag in templates to display content:
<div class="article">
<?content(about-us)?>
</div>
See The Content Tag for detailed usage.
Content Editor
Features
The built-in content editor provides:
- Markdown syntax highlighting
- Preview capability
- HTML editing mode
- Save and discard options
Markdown Mode
Write using standard Markdown:
# Heading
This is a paragraph with **bold** and *italic* text.
- List item 1
- List item 2
[Link text](url)
HTML Mode
For complex formatting:
<div class="custom">
<h2>Custom HTML</h2>
<p>With full HTML control.</p>
</div>
Content Workflow
Typical Workflow
- Create: Write initial content
- Review: Check content accuracy
- Publish: Content is immediately live
- Update: Edit as needed
- Archive: Remove or replace old content
Best Practices
- Use descriptive content names
- Organize with content types
- Create language variants as needed
- Review security settings
Importing Content
Bulk Import
APD supports importing content from ZIP files:
- Prepare markdown files in a ZIP
- Click Import Content in Content List
- Select the content type
- Upload the ZIP file
File Naming
- File names become content names
- .md files set to Markdown style
- .html files set to HTML style