Table Of Contents

  • Link to a file (fileref)
    • Attribute options
    • Edit mode
    • Using in the markup
Close
Logo
  • Issues
  • RU
  • Issues
  • RU
  • Features and non-features
  • Getting started
    • Introduction to ηCMS
    • Creating a new project
  • Server configuration
    • Example of ηСМС configuration file
    • Additional (Advanced) configuration items
  • Supported databases
    • IBM DB2
    • PostgreSQL
  • Administrator GUI
    • Page content management
    • File management in ηCMS (media repository)
    • Assembly Management
    • Assembly attributes
    • News feeds management
    • The visual editor of pages
    • Traffic management
    • User Management
  • HTTL markup
    • HTTL Basics
    • HTTL ηCMS extensions
    • Advanced HTTL
    • Utility methods of HTTL markup
  • Social networks integration
    • Support of Open Graph protocol
  • Deployment options
    • Deployment as an independent service
    • Deployment within a context of another website
  • Recipes and Best Practices
    • Defining templates for pages having a common structure
    • Define only page attributes that can be really changed during a page lifetime
  • Extending ηCMS
  • Misc
    • Use of table attributes in a page markup
  • Administrator GUI
  • Assembly attributes

Link to a file (fileref)¶

Attribute options¶

../../../../_images/fileref_img1.png

Attribute options

Option Description
Location Location of the file in the ηCMS media repository.
Render as a template If this option is enabled, the file content will be interpreted as HTTL template and inserted as attribute value.
Render only location If the switch is on, a file path will be a value of this attribute. Otherwise it will be a file content or file content processed as a template depending on Render as a template option.

Edit mode¶

../../../../_images/fileref_img2.png

Path to the file in the ηCMS media repository

Using in the markup¶

Type of the attribute value: java.lang.String

For example, activate the checkbox Render as a template, and create the file template-inc.httl containing:

<p>
  #set(String name = "Template")
  <b>Hello from ${name}</b>
</p>

Choose that file to set filref attribute and modify the page core:

FileRef: $!{asm('file1')}

As a result, we get the following page:

../../../../_images/fileref_img3.png
  • Administrator GUI
  • Assembly attributes
ηCMS Github
Star Issue
  • Issues
  • RU
© Copyright Softmotions Ltd, 2017.