ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

HTML and/or pMachine tags in title field

February 08, 2012 4:09am

Subscribe [1]
  • #1 / Feb 08, 2012 4:09am

    agregat

    26 posts

    I am in the process of moving an online journal from an old pMachine installation to EE2.

    Given that this is a journal, a number of our titles use italics within them (maybe to cite a book/film) - something which was never a problem in pMachine.

    However, now that they are in EE2 these titles are just displaying the pMachine code: as you can see in this example:

    http://www.intralinea.org/archive/article/Dei_delitti_e_delle_pene_di_Cesare_Beccaria_in_spagnolo

    Here the article is citing a book and it is important that the book title be in italics.

    I have tried using < em > but that doesn’t work either, as all tags are stripped from the field as far as I can make out.

    Is there a way around this problem that does not involve having to substitute the title field with a custom field?

    In the end, I suppose being able to italicize would be enough..

    thanks

    Chris

  • #2 / Feb 09, 2012 1:58pm

    Dan Decker

    7338 posts

    Hi agregat,

    Thanks for moving to ExpressionEngine! I’m an old hand at pMachine too!

    ExpressionEngine only allows for standard text in the title field. What you can do is apply your styling to the {title} field in your template:

    {exp:channel:entries channel="journal"}
    <em>{title}</em>
    {/exp:channel:entries}

    Cheers!

  • #3 / Feb 09, 2012 5:36pm

    agregat

    26 posts

    Thanks for the suggestion Dan, but the problem is that I want to italicize part of the title, not all of it - as in the example I’ve linked to.

    What if I were to intervene in the database using phpAdmin and change the field type to “TEXT” instead of “VARCHAR”?

    cheers

    chris

  • #4 / Feb 13, 2012 2:21pm

    Dan Decker

    7338 posts

    Hi Chris,

    What if I were to intervene in the database using phpAdmin and change the field type to “TEXT” instead of “VARCHAR”?

    That would not be my first suggestion 😉

    What you can do though is add a new channel field to the field group that is assigned to this channel. Set the field type to “text” and HTML Formatting to “None”. This would then become your “title” field for use in your templates.

    With that field type and those settings you can have HTML in the text field with no problem. The caveat is having to update all of your previous entries with content in the new field.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases