Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 08, 2011 @ 18:41
    Bjarne Fyrstenborg
    0

    Width of table

    Hi..

    Great package :)

    Is it possible to specify the width of the table or perhaps in a future version to drag each column/row wider like in Excel?

    I'm trying the package for product specifications, but when I only have two columns I would like the second column was a bit wider..

    Bjarne

  • Mike Taylor 155 posts 353 karma points
    Dec 08, 2011 @ 18:43
    Mike Taylor
    0

    Not currently possible, but may be something that could be set in prevalues in a future version. I'll look into it.

    Thanks for the feedback :-)

    Mike

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 08, 2011 @ 18:52
    Bjarne Fyrstenborg
    0

    Okay... thanks.

    Bjarne 

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 08, 2011 @ 19:06
    Bjarne Fyrstenborg
    0

    How do I insert the data into a table?
    when using <xsl:value-of select="produktSpec" disable-output-escaping="yes"/> I get all content as a string..

    I need something like:

    <table>
    <xsl:for-each select="....">
    <tr>
    <td>....</td>
    <td>....</td>
    </tr>
    </xsl:for-each>
    </table>

     Bjarne

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 08, 2011 @ 19:28
    Bjarne Fyrstenborg
    0

    Okay, I tooked a look at the umbraco.config file to see the data and came up with this:

    <div id="productSpec">
              <table>
                <xsl:for-each select="./produktSpec/Data/Body/Row">
                  <tr>
                    <td>
                      <xsl:value-of select="./RowHead" disable-output-escaping="yes"/>
                    </td>
                    <td>
                      <xsl:value-of select="./Cell" disable-output-escaping="yes"/>
                    </td>
                  </tr>
                </xsl:for-each>
              </table>
            </div>

    Bjarne

  • Mike Taylor 155 posts 353 karma points
    Dec 12, 2011 @ 18:00
    Mike Taylor
    1

    Hi Bjarne

    I'm looking at posting samples of XSLT and Razor to pull the data into an HTML table. That'll be coming soon.

    In the meantime, I've just released v0.5 of the datatype, which adds the ability to change the width of individual columns via the popup context menu on right click.

    Hope that helps,

    Mike

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 12, 2011 @ 18:31
    Bjarne Fyrstenborg
    0

    Hi Mike

    Thanks, I'll take a look at it :)

    The code above works okay right now under the "Specifikationer" tab: http://sub.ak-security.dk/da/shop/lygter/led-lenser-p7.aspx to get the data. I wanted a link in one of the cells to the website of the manufacturer, but I had to modify a bit in xslt:

    <xsl:choose>
      <xsl:when test="contains(./Cell,'http://') or contains(./Cell,'www')">
        <href="{./Cell}" target="_blank">Klik her</a>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="./Cell" disable-output-escaping="yes"/>
      </xsl:otherwise>
    </xsl:choose>

    but not the most ideal as the cell only must contain the url and the link text is either the same text or the value of the cell (the url).

    I think it's possible to write the html code direct in the table cell, but again not ideal for end-user.
    Perhaps it could be future features to with simple html formatting? bold, italic, insert a link?

    Bjarne 

  • Mike Taylor 155 posts 353 karma points
    Dec 12, 2011 @ 18:34
    Mike Taylor
    0

    Hi Bjarne

    The way it's currently built, html formatting would be pretty tricky (it's essentially just a table full of <input> text boxes). Originally, it was built to show numeric data tables, so formatting wasn't a huge issue. I think the best way is to do what you've done, and incorporate your logic into whatever you use to output the data (eg use prefixes or other codes in the inputted data).

    Cheers,

    Mike

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 12, 2011 @ 19:01
    Bjarne Fyrstenborg
    0

    Okay.. there could probably be some more test that it should first start creating the link where http:// or www starts and then end after an empty space.. then I think you could write text too in same cell like: A link to www.google.com where only www.google.com is a link.. right now all data in my cell will be created as link, so I must be aware on this.

    But I think the datatype is ideal for product specifications, where you often want to setup some technical specifications in a table and then it's easy with xslt to add even and odd classes to the rows to present the data nice in the table.

    Bjarne

     

Please Sign in or register to post replies

Write your reply to:

Draft