≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #1345

Feature request #1345: Store some database content as Haml

Kind feature request
Product wincent.dev
When 2009-07-07T12:55:34Z
Status open
Reporter Greg Hurrell
Tags no tags

Description

While working on the new product pages (in HTML) I was just wondering whether storing them in Haml in the database might be a worthwhile thing.

Compare:

<div id="product-container" class="synergy">
  <div id="product-header" class="synergy">
    <h1>Synergy &mdash; iTunes at your fingertips</h1>
    <a href="/products/synergy/">
      <img id="product-icon" alt="Synergy icon" src="/assets/synergy/icon.png" />
      <img id="product-title" alt="Synergy" src="/assets/synergy/title.png" />
      <img id="product-slogan" alt="iTunes at your fingertips" src="/assets/synergy/slogan.png" />
    </a>
    <a href="/products/synergy/download" id="product-download"></a>
    <a href="/products/synergy/purchase" id="product-purchase"></a>
    <!-- "sub" navbar -->
    <ul>
      <li><a href="/products/synergy/support/">Support</a></li>
      <li><a href="/products/synergy/history/">History</a></li>
      <li><a href="https://wincent.dev/a/products/synergy-classic/buttons/">Buttons</a></li>
    </ul>
  </div> <!-- product-header -->

To:

#product-container.synergy
  [/tags/product #product]-header.synergy
    %h1 Synergy &mdash; iTunes at your fingertips
    %a(href="/products/synergy/")
      %img#product-icon(src="/assets/synergy/icon.png" alt="Synergy icon")
      %img#product-title(src="/assets/synergy/title.png" alt="Synergy")
      %img#product-slogan(src="/assets/synergy/slogan.png" alt="iTunes at your fingertips")
    %a#product-download(href="/products/synergy/download")
    %a#product-purchase(href="/products/synergy/purchase")
    %ul
      %li
        %a(href="/products/synergy/support/") Support
      %li
        %a(href="/products/synergy/history/") History
      %li
        %a(href="https://wincent.dev/a/products/synergy-classic/buttons/") Buttons

Not sure if there is any real advantage to it but wanted to get it in the tracker anyway and will think about it.

Comments

  1. Greg Hurrell 2009-07-07T13:04:52Z

    Did a little search to see if people are doing this.

    engine = Haml::Engine.new("%p Haml code!")
    engine.render
    • http://groups.google.com/group/haml/browse_thread/thread/aed6983444415378/6ed7ad1961da30ba?lnk=gst&q=store+haml+in+database#6ed7ad1961da30ba
    • http://haml-lang.com/docs/yardoc/Haml/Engine.html
    • http://nex-3.com/posts/58-caching-with-haml
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets