Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 14, 20159 yr 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)
July 14, 20159 yr You are missing a “=” in your example. Note also, if you use the custom field, you don’t make the full call with $record… That’s for Pages templates. In the Display Custom Format field you just put something like <p style="color:#F00">{$value}</p>
July 14, 20159 yr Author 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.
July 14, 20159 yr Title and Content are special fields which are directly called in the template. If you want to style the headline for example I would rather recommend to do that in the custom.css.
July 14, 20159 yr Author But... if i make in css i make for all database. Instead we have here "Custom Format" also in content and title field pagesQuote 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.
July 14, 20159 yr But... if i make in css i make for all database. Instead we have here "Custom Format" also in content and title field pagesQuote 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.
July 14, 20159 yr Author ok, u're right, instead content is outpout in this way: no id or class - eg with field name - to put css only to this field... and this, imho, can be simply edit with custom format (with span, or p, or div...)!
Archived
This topic is now archived and is closed to further replies.