Copied to clipboard

Flag this post as spam?

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


  • Stefan 5 posts 54 karma points
    Jan 21, 2014 @ 11:33
    Stefan
    0

    Macro in line with content

    Hi. I am new to Umbraco and I could not find my way around this issue:

    I am trying to have a macro (a .NET user control) together with some content on a page. The content (text) and the macro should be on the same line.

    For example, I should be able to display:

    "Hello. My name is John and I am 22 years old." (Where 22 comes from my .NET user control).

    I have tried different solutions including:

     

    Is there a simple and straight forward solution to my problem?
    Thanks in advance. I look forward to hearing from you.

     

     

  • Kasper Dyrvig 246 posts 379 karma points
    Feb 11, 2014 @ 15:20
    Kasper Dyrvig
    0

    Hi Stefan

    Where does the data ("22") come from? Is it already in Umbraco or a calculation? Or something else?

    In case it is data stores in Umbraco or it is a simple calculation, you could build the whole line "Hallo. My name ... 22 years old." in xslt or razor. I'm just wondering what is the reason for making a usercontrol for printing "22"...?

  • Stefan 5 posts 54 karma points
    Feb 11, 2014 @ 15:33
    Stefan
    0

    Hi.

    The value comes from a sql database after being altered by several calculations (in the code behind of the user control)...

    I am new to Umbraco and I could not find another way of achieving this.

    I would appreciate your help. How could I access the database in an xslt script?

  • Stefan 5 posts 54 karma points
    Feb 12, 2014 @ 10:05
    Stefan
    0

    Hi again

    I need to create macros for user to acces data from a sql database in an easy way, they will not have the knowlegde to create the scripts needed to create the whole line in your example.

     

Please Sign in or register to post replies

Write your reply to:

Draft