Gossamer Forum
Home : Products : Links 2.0 : Customization :

'what's new' question.

Quote Reply
'what's new' question.
How to modify the what's new section to show
"There is no new resources submitted at the moment" or whatever, when there is no new resources?

Currently if there is no New links, Popular links, there will be nothing printed in it.

Any ideas or anyone has done this?
Quote Reply
Re: 'what's new' question. In reply to
If you are not using templates, go to site_html.pl, sub site_html_new, and add this just above $output = qq~ line:

Code:
if ($total < 1) {
$link_results = "There are no new resources at this time."
}

If using templates, install the "Nested if" mod in the resource center and replace the <%link_results%> line in new.html with:

Code:
<%if link_results%>
<%link_results%>
<%endif%>
<%ifnot link_results%>
There are no new resources at this time.
<%endif%>

If you do not want to install the "nested if" mod, do this in sub site_html_new of site_html_templates.pl just before the return &load_template ('new.html', { line:

Code:
if ($total < 1) {
$link_results = "There are no new resources at this time."
}

I hope this helps.
Quote Reply
Re: 'what's new' question. In reply to
Man... what a rapid reply, and again... thanx Bobsie.