x First time here? Check out the FAQ

Learn from 350 other Umbracians at the annual Umbraco Conference - CodeGarden '13.
More than twenty high quality sessions, open spaces, hackathons and social events you'll remember. Not to be missed!
Less than 25 tickets left - get yours now!

  • Avatar1439posts1708karma

    custom datatype with different values for ftont-end and back-end

    Peter Dijksterhuis started this topic July 20, 2009 @ 12:28 , this topic was edited at: Wednesday, September 9, 2009 12:49 PM

    Time to post a question instead of an answer myself this time ;)

    I'm creating a custom datatype (which connects WikiPlex to umbraco, as per request by Douglas) which would need 2 values. An original value so it can be edited in the back-end, and a rendered value for display at the front-end.

    Is this thought a bit too far and should I just render the content each time it is requested or is a dual-value situation possible? If so, what would be the best way to do it? Store it as custom XML?

    For any pointers I would be very gratefull :-)

    Peter


  • Replies

  • Avatar2819posts7590karma
    admin Comment with ID: 10104
    Lee Kelleher posted this reply July 20, 2009 @ 12:38

    Do you know if any benchmarks have been done on WikiPlex yet?

    Wonder what they do on CodePlex? I'm guessing that the wiki-content is rendered at runtime - rather than rendered at save/publish (and stored in the database).

    I'd probably go with render at runtime myself... but I can see what you are aiming for with the performance gains of storing both values.

    - Lee


  • Avatar911posts1430karma
    Comment with ID: 10211
    Petr Snobelt posted this reply July 21, 2009 @ 12:17

    You can create settings to your datatype and on publish store rendered content here.

    or store values as xml with subnodes (similar to relatedlinks datatype)


  • Avatar37posts131karma
    Comment with ID: 10458
    Gerben posted this reply July 23, 2009 @ 12:33

    As a general software architect rule: "the same data should be stored at a single (only one) location".(Not knowing the details of your envisioned solution though...)

    I would go for the render at run-time option, and apply caching to overcome any performance issues.


  • pvassalo posted this reply September 9, 2009 @ 12:49

    Hi!

    How do I create a custom setting for a custom data type? I can't find any help about this

    thanks!
    Pedro


Please login or Sign up To post replies