tag:help-archives.hannonhill.com,2010-02-09:/discussions/general/12225-formatting-columnsCascade CMS: Discussion 2013-08-20T01:37:24Ztag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-23T17:49:02Z2013-02-23T17:49:02ZFormatting columns<div><p>Hello,</p>
<p>The layout you are describing sounds like a very regular set of
data. This seems like it would be perfect for couple of solutions.
One solution could be to create a data definition on the page with
a repeatable group that contains the Alert Number, Date, and
Description as fields. This could then be formatted with either
Velocity or XSLT format to create your output. Another solution
could be to store all the values as meta attached to the pdf files
of the reports (if you store them in Cascade). Then you could
create an index that has the meta data for the files and generate
your output with either Velocity or XSLT.</p>
<p>Hope this helps and gives you come ideas,<br>
Bryce</p></div>Bryce Robertstag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-25T13:50:21Z2013-02-25T13:50:21ZFormatting columns<div><p>Hi,</p>
<p>Just wanted to add in that you could also use Structured Data
Blocks that have a Data Definition containing the fields for the
alert information (eg number, date, description) as well as a file
chooser for the PDF. This solution would also require using an
Index Block to generate your listing.</p>
<p>IMO, I think Bryce's second solution, adding metadata and
dynamic metadata fields to the Files, might be the simplest, and
perhaps best solution. This would make updating and maintenance for
end users much simpler, because they would only have to create one
Asset vs. multiple (ie a Block/Page and a File). You could even go
one step further with this and use Database Publishing to publish
the File and Metadata to a Database, allowing you to re-use the
content elsewhere (or maybe even create a simple search
engine).</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-25T17:04:26Z2013-02-25T17:04:26ZFormatting columns<div><p>-----Original Message----- From: Bryce Roberts [mailto:<a href=
"mailto:tender+d2f340c6e0aab0664013c59152266e6efe2b0b7b3@tenderapp.com">tender+d2f340c6e0aab0664013c59152266e6efe2b0b7b3@tenderapp.com</a>]<br>
Sent: Saturday, February 23, 2013 9:49 AM<br>
To: Polite, Vincent<br>
Subject: Re: Formatting columns [General #12225]</p>
<p>Thanks Bryce,<br>
I already have the Data Definition setup so the user can upload the
pdfs and input the other data. I'm unsure about the creating the
headings for what is inputted. I'm sure I don't have the correct
vocabulary for this. It is the static part that is my concern.</p>
<p>Thanks,<br>
Vince</p>
<h1>// Add your reply above here</h1>
<p>From: Bryce Roberts<br>
Subject: Formatting columns</p>
<p>Hello,</p>
<p>The layout you are describing sounds like a very regular set of
data. This seems like it would be perfect for couple of solutions.
One solution could be to create a data definition on the page with
a repeatable group that contains the Alert Number, Date, and
Description as fields. This could then be formatted with either
Velocity or XSLT format to create your output. Another solution
could be to store all the values as meta attached to the pdf files
of the reports (if you store them in Cascade). Then you could
create an index that has the meta data for the files and generate
your output with either Velocity or XSLT.</p>
<p>Hope this helps and gives you come ideas, Bryce</p>
<p>View this Discussion online: <a href=
"http://help.hannonhill.com/discussions/general/12225-formatting-columns">
http://help.hannonhill.com/discussions/general/12225-formatting-col...</a></p>
<p>To unsubscribe and stop receiving emails from <a href=
"http://help.hannonhill.com">http://help.hannonhill.com</a>,
visit<br>
<a href=
"http://help.hannonhill.com/unsubscribe/bbd12f8174eee7a9c578a5e9e1423ec1620f1d54">
http://help.hannonhill.com/unsubscribe/bbd12f8174eee7a9c578a5e9e142...</a></p></div>politevtag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-25T17:26:05Z2013-02-25T17:26:05ZFormatting columns<div><p>Hi Ryan,<br>
Forgive me, I know I don't have the correct vocabulary. I have the
dynamic part of this working. I have the Data Definition set up for
what the user inputs. It is the static part I'm not sure about. It
is easier for me to think in terms of an HTML; where I have more
experience. If you have a table</p>
, I'm looking to create the table headings
<table>
<tr>
<th>. Should I use the WYSIWYG editor in the Data Definition
Builder for the headings? How do I alter the XSLT?
<p>Current Data Definition:</p>
<p><br></p>
<p>And the XSLT:</p>
<p><br>
<a href="/xsl:apply-templates">/xsl:apply-templates</a> <a href=
"/xsl:template">/xsl:template</a></p>
mmmm dd, yyyy<a href="/xsl:with-param">/xsl:with-param</a> <a href=
"/xsl:call-template">/xsl:call-template</a>
<ul>
<li><a class="pdf" href="{path}"></a>xsl:choose <a href=
"/xsl:when">/xsl:when</a> <a href="/xsl:when">/xsl:when</a>
<a>xsl:otherwise</a><a href="/xsl:otherwise">/xsl:otherwise</a>
<a href="/xsl:choose">/xsl:choose</a></li>
<li style="list-style: none"><a href=
"/xsl:for-each">/xsl:for-each</a></li>
</ul>
<a href="/xsl:if">/xsl:if</a> <a href=
"/xsl:template">/xsl:template</a> <a href=
"/xsl:stylesheet">/xsl:stylesheet</a>
<p>Thanks,<br>
Vince</p>
</th>
</tr>
</table></div>politevtag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-25T20:38:43Z2013-02-25T20:38:43ZFormatting columns<div><p>Hi Vince,</p>
<p>If you're looking to convert the XSLT above into a table, I
would do something like the following:</p>
<pre>
<code><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="/__development/formats - XSLT/included helpers/date format"/>
<xsl:template match="system-index-block">
<table>
<thead>
<tr>
<th>Alert #</th>
<th>Date</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="system-block">
<xsl:sort data-type="number" lang="en" order="descending" select="system-data-structure/date"/>
</xsl:apply-templates>
</tbody>
</table>
</xsl:template>
<xsl:template match="system-block">
<tr>
<td><xsl:value-of select="system-data-structure/title"/></td>
<td>
<xsl:call-template name="format-date">
<xsl:with-param name="date" select="system-data-structure/date"/>
<xsl:with-param name="mask">mmmm dd, yyyy</xsl:with-param>
</xsl:call-template>
</td>
<td>
<xsl:if test="count(system-data-structure/file) &gt; 0">
<ul>
<xsl:for-each select="system-data-structure/file">
<li>
<a class="pdf" href="{path}">
<xsl:choose>
<xsl:when test="title"><xsl:value-of select="title"/></xsl:when>
<xsl:when test="display-name"><xsl:value-of select="display-name"/></xsl:when>
<xsl:otherwise><xsl:value-of select="name"/></xsl:otherwise>
</xsl:choose>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</td>
</tr>
</xsl:template>
</xsl:stylesheet></code>
</pre></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-25T20:46:19Z2013-02-25T20:46:19ZFormatting columns<div><p>Thanks a lot Ryan. I was just about to use an XHTML block to
create the headings...Finally figured that part out. But using the
table, we could probably use it in different ways, substituting the
heading.</p>
<p>Thanks,<br>
Vince</p></div>politevtag:help-archives.hannonhill.com,2010-02-09:Comment/252274542013-02-25T21:01:13Z2013-02-25T21:01:13ZFormatting columns<div><p>Thank you for the follow up, Vince. Glad to hear that did the
trick.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Thanks</p></div>Ryan Griffith