Jump to content

Pages: how to add style in content field?


laltroweb.it

Recommended Posts

Like from object,

I've some database in ipb pages, and i want add custom style in content fiels, but i've this advise:

  • This field is set to be the record content. The content field is not included in the list of custom fields when displayed in the default templates. You can adjust the display options here for when using {$record->customFieldDisplayByKey('content_key', ['display|listing'])|raw}. Using $record->_content will always get the article formatted content.

... if i've fine understood, i've put this in content "custom format", but wihout result:

<p style"somestylehere...">{$record->customFieldDisplayByKey('contenuto', ['listing'])|raw}</p>

someone can help me? :)

 

thanks in advance,

L'AltroWeb (DarkWolf)

Link to comment
Share on other sites

Thanks for reply, Ralf...

Yes, in my code is missing a "=", thanks (but i've put this code just for example and i've missed, sorry)...

-

i've try now your code, and also with "raw": <p style="color:red">{$value|raw}</p>

but still do nothing. otuput remain the same here: http://www.laltroweb.it/citazioni/ (and also in directory).

-

works fine, instead, with other field (not with title, and with content. ok with authot field: my custom field in this database).

PS: i've try also with default template... just to be sure.

Link to comment
Share on other sites

But... if i make in css i make for all database. Instead we have here "Custom Format" also in content and title field pages

Quote from you previous post: "put something like <p style="color:#F00">{$value}</p>" ...is so simple instead to go in css and edit here, i think.

Link to comment
Share on other sites

But... if i make in css i make for all database. Instead we have here "Custom Format" also in content and title field pages

Quote from you previous post: "put something like <p style="color:#F00">{$value}</p>" ...is so simple instead to go in css and edit here, i think.

Depends. 

The headline for example is already generated as …

<h2 class="ipsType_pageTitle"><a href="link">Your Headline</a></h2>

It’s really messy to try to force addition styling in there. 
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...