Copied to clipboard

Flag this post as spam?

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


  • Alexadar 17 posts 37 karma points
    Oct 21, 2011 @ 21:00
    Alexadar
    0

    XLST Parameters

    Hi!

    I made xlst macro with parameters. This macro will use this parameters to write "description" and "keyword" tags. I put this macro in the template content.

    I want to allow my customer to set up macro parameters easily from page editor.

    Is it possible somehow to allow site admin to set up macro parameters in page editor for each page?

     

  • Alexadar 17 posts 37 karma points
    Oct 21, 2011 @ 21:04
    Alexadar
    0

    Some moar info:

    My customer should be able to set up macro parameters from page editor, assuming that each page inherited from template with macro what have some parameters to input.

    Is it possible somehow?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 21, 2011 @ 21:16
    Tom Fulton
    0

    Hi,

    Are you wanting to allow your editors to insert the macro into the Richtext editor?  If so, you can do that by editing the Macro in the Developer section and tick the "Allow macro in richtext editor" box.  Then when you click Insert Macro this macro will appear and prompt for any parameters.

    But I think what you are wanting is to have the macro in the template, and populate the parameters based on page fields?  If so you can do that too using Advanced Macro Parameter Syntax.  So you can add two fields to your document type(s), metaDescription and metaKeywords, then reference the macro like this:

    <umbraco:Macro Alias="myMacro" description="[#metaDescription]" keywords="[#metaKeywords]" runat="server" />

    See the above link for some other options like making the properties recursive.

    -Tom

  • Alexadar 17 posts 37 karma points
    Oct 21, 2011 @ 21:41
    Alexadar
    0

    Thank you for your answer.

    I would like to know: how can i add fields to document type?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 21, 2011 @ 21:44
    Tom Fulton
    1

    Hi,

    You would do this under Settings -> Document Types -> (your document type), then click the Generic Properties tab

    I would suggest you check out this video:  Document types from the Introduction to Umbraco series for more info

    Thanks,
    Tom

  • Alexadar 17 posts 37 karma points
    Oct 22, 2011 @ 13:44
    Alexadar
    0

    Thanks! That was helpfull!

    /thread

Please Sign in or register to post replies

Write your reply to:

Draft