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 6342739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:17:59+00:00 2026-05-24T20:17:59+00:00

I have a text field in my model that contains markdown text. I need

  • 0

I have a text field in my model that contains markdown text. I need to convert the text to html and show it in my .pt template. what is the best way to do it?

I realise that I can add a method to my model that converts the field and returns HTML, and then call the method from my template, but can I do it without this extra method, by using only the markdown field in my template similarly to Django’s?

{{ mytext|markdown:"safe" }}
  • 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-05-24T20:18:00+00:00Added an answer on May 24, 2026 at 8:18 pm

    Plone, which uses TAL for it’s templating engine and can use StructuredText, reStructuredText, and other rich text formats, does all the rendering to HTML outside TAL. So you might be barking up the wrong tree in the approach you’re going for.

    That said, TAL has a somewhat extensible “expression” system which is why you can have path expressions (the default) or python expressions. In the zope world, which includes plone, there’s a page composition system called content providers, so someone implemented a provider tal expression. So maybe you can look at that:

    tales.py

    configure.zcml

    The structure keyword is still your easiest bet.

    <div tal:replace="structure view/getMarkdown">rendered markdown</div> 
    

    But structure is a special case keyword and not an extensible part of page templates.

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

Sidebar

Related Questions

I have model Article it has field title with some text that may contain
I have a table that contains a text field, there is around 3 to
i have table that contain A text field [nvarchar(10)] how to convert this field
I am trying to create form that contains another model in rails. I have
I'm developing a Django application that contains a model with a date/time field. On
I have a text field (flash.display.textField) for editing, but the default font does not
I have a text field and am looking to have if be valid for
If I have a text field with SWT, how can I get the field
Hi I have a text field which I would like to bind to a
I am making a text based game in Java. I have a text field,

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.