As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I am trying to build a website using Alfresco WCM. I was wondering if it is best to build a custom content model by extending the content model XML file available or should I use the Xforms approach to capture my meta data?I would really appreciate a reply as I am new to Alfresco.Thanks
<?xml version="1.0"?> <!– Copyright (C) 2007 Eye Street Software Corporation. –> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:alf="http://www.alfresco.org" xmlns:sample="http://www.eyestreet.com/sample" targetNamespace="http://www.eyestreet.com/sample" elementFormDefault="qualified"> <!– call /cms/cms.jsp to build dynamic list of services: sample:serviceList <xs:include schemaLocation="/cms/cms.jsp"/> otherwise, define sample:serviceList locally: –> <xs:simpleType name="serviceList"> <xs:restriction base="xs:string"> <xs:enumeration value="1"> <xs:annotation> <xs:appinfo> <alf:label>Onsite Training</alf:label> </xs:appinfo> </xs:annotation> </xs:enumeration> <xs:enumeration value="2"> <xs:annotation> <xs:appinfo> <alf:label>Professional Services</alf:label> </xs:appinfo> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> <!– defines the form for creating a product –> <xs:element name="product"> <xs:complexType> <xs:sequence> <xs:element name="name" type="xs:normalizedString"/> <xs:element name="image" type="xs:anyURI"/> <xs:element name="purchase_online" default="1" minOccurs="0" maxOccurs="1"> <xs:simpleType> <xs:restriction base="xs:normalizedString"> <xs:enumeration value="1"> <xs:annotation> <xs:appinfo> <alf:label>Yes</alf:label> </xs:appinfo> </xs:annotation> </xs:enumeration> <xs:enumeration value="0"> <xs:annotation> <xs:appinfo> <alf:label>No</alf:label> </xs:appinfo> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="related-service" type="sample:serviceList" minOccurs="1" maxOccurs="1"> <xs:annotation> <xs:appinfo> <alf:label>Available Services</alf:label> <alf:appearance>minimal</alf:appearance> </xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
<#ftl ns_prefixes={"sample", "http://www.eyestreet.com/sample"}> <#assign product = .vars["sample:product"]> <html> <head> <style type="text/css"> body { font-family: Tahoma, Arial, Helvetica, sans-serif; background-color: white; font-size: 12px; } .name { color: #003366; font-weight: bold; margin-right: 10px; margin-top: 10px; } </style> <title>${product["sample:name"]}</title> </head> <body> <div class="name">name: ${product["sample:name"]}</div> <img src="${product["sample:image"]}></img> <div class="name">purchase_online: ${product["sample:purchase_online"]}</div> <div class="name">related-service: ${product["sample:related-service"]}</div> </body> </html>