I’ve setup a Configuration weblog so that content admins have access to easily change some settings; such as how many news items appear on the home page.
My question is how do I get the field value from that weblog into the attributes for a {exp:weblog:entries} loop.
I currently have:
{exp:weblog:entries weblog="config" url_title="config"}
<div id="about">
{exp:weblog:entries weblog="page" dynamic="off" url_title="home"}
{page_content}
{/exp:weblog:entries}
</div>
<div id="events">
<h3>Upcoming Events</h3>
<p><ul>{exp:weblog:entries weblog="event" limit='{upcoming_number}' dynamic="off" show_future_entries="yes" sort="asc" orderby="entry_date" start_on="{current_time format='%Y-%m-%d 00:00'}"}<br />
<li><a href="http://{path=pages/event}{entry_id}">{title}</a> <span class="date">{entry_date format="%j %M"}</span></li><br />
{/exp:weblog:entries}</ul><br />
</div><br />
<div id="news"></p><h3>Latest News</h3>
<p>{exp:weblog:entries weblog="news" dynamic="off" limit="{news_number}"}</p><h4><a href="http://{title_permalink=pages/story}">{title}</a></h4>
<h5>{entry_date format="%l, %j %F, %y"}</h5>
<p>{exp:char_limit total="300"}<br />
{news_content}<br />
{/exp:char_limit}<br />
<a href="http://{title_permalink=pages/story}">continue reading</a><br />
{/exp:weblog:entries}<br />
</div><br />
{/exp:weblog:entries}This gives the following error:
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘{upcoming_number}’ at line 2
Query: SELECT t.entry_id FROM exp_weblog_titles AS t LEFT JOIN exp_weblogs ON t.weblog_id = exp_weblogs.weblog_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !=’’ AND t.site_id IN (‘1’) AND (t.expiration_date = 0 || t.expiration_date > 1261059854) AND exp_weblogs.is_user_blog = ‘n’ AND t.weblog_id = ‘5’ AND t.entry_date >= ‘1261004416’ AND t.status = ‘open’ ORDER BY t.sticky desc, t.entry_date asc LIMIT 0, {upcoming_number}
Any advice would help,
Thanks 😊