I am trying to create a database-driven newsroom in Freeway and am encountering two challenges:
I would like to style the text. I’ve placed php code in html markup items on a text box and formatted all the content in the text box as Helvetica 12 pt. but the text comes out unstyled.
I would like to have line breaks between the items but am unable to do that either by inserting , n or rn.
Here’s the markup code in 2 html markup items in the text box:
I am trying to create a database-driven newsroom in Freeway and am
encountering two challenges:
I would like to style the text. I’ve placed php code in html markup
items on a text box and formatted all the content in the text box as
Helvetica 12 pt. but the text comes out unstyled.
I would like to have line breaks between the items but am unable to
do that either by inserting , n or rn.
Here’s the markup code in 2 html markup items in the text box:
Presumably (what is, in effect)
showRows(getAllByType(‘news’,array(‘year’=>‘All’,‘limit’=>4)))
shows multiple rows of news. For the browser to put a line break
in-between items you need to put a ‘ ’ between them. Have you
tried putting a ‘ ’ on the end of each news item as it is stored
in the database?
To style text that you are inserting from a markup item, try putting a space before and after the markup item, and then select the entire space/markup item/space sandwich as one line of text. With that selected, apply your style. Markup items all by themselves on a line do not get any styling applied to themselves.
As far as the loop goes, you’re going to need to break the function down to something that can show one line, rather than all rows. So imagine that you have such a function called showLine($record) you could do this:
<?php
foreach(getAllByType('news, array('year'=>'All','limit'=>4)) as $line){
?>
and then
[space with style]<?= showLine($line) ?>[shift-return (to make a line-break)]
[space with style]
followed by
<?php } ?>
Walter
On Apr 23, 2018, at 1:07 PM, Richard Cacciato email@hidden wrote:
I am trying to create a database-driven newsroom in Freeway and am encountering two challenges:
I would like to style the text. I’ve placed php code in html markup items on a text box and formatted all the content in the text box as Helvetica 12 pt. but the text comes out unstyled.
I would like to have line breaks between the items but am unable to do that either by inserting , n or rn.
Here’s the markup code in 2 html markup items in the text box: