Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7879051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:49:01+00:00 2026-06-03T03:49:01+00:00

Possible Duplicate: Variable setting in Dreamweaver template in SDL Tridion We use RenderComponentPresentation (on

  • 0

Possible Duplicate:
Variable setting in Dreamweaver template in SDL Tridion

We use RenderComponentPresentation (on Tridion 2009) to render internal and external links so that the code base is in only one Dreamweaver template. It would be helpful if we could pass through an optional CSS Class to use when rendering the link.

Any ideas how this could be done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:49:03+00:00Added an answer on June 3, 2026 at 3:49 am

    It is possible to set a value in the RenderContext and then retrieve it in the second Dreamweaver template.

    Before calling RenderComponentPresentation set a render context value as follows:

    @@SetRenderContextVariable("CSSClass","red")@@  
    

    You will need to have a C# Fragment or TBB to get the variables out of the render context and add them to the package in the second Dreamweaver template. An example would be:

    var renderContext = engine.PublishingContext.RenderContext;
    foreach (string key in renderContext.ContextVariables.Keys)
    {
        var value = renderContext.ContextVariables[key] as string;
        var item = package.CreateStringItem(ContentType.Text, value);
        package.PushItem("RenderContextVariable."+key, item);
    }
    

    You should then be able to access the variables within the package using the standard Dreamweaver notation

    @@RenderContextVariable.CSSClass@@
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Setting variable to NULL after free … I am learning about good
Possible Duplicate: Use autorelease when setting a retain property using dot syntax? What is
Possible Duplicate: Use a variable within a variable? Java Hi this is a general
Possible Duplicate: Use a variable to define a PHP function Is there a way
Possible Duplicate: Accessing inherited variable from templated parent class There's this class: template<typename T>
Possible Duplicate: Finding the Variable Name passed to a Function in C# In C#,
Possible Duplicate: C# member variable initialization; best practice? Is there any benefit to this:
Possible Duplicate: Difference between pointer variable and reference variable in C++ When should I
Possible Duplicate: Difference between pointer variable and reference variable in C++ I am reading
Possible Duplicate: How to get javascript variable value in php I am looking for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.