Page 1 of 1
Smarter Menu
Posted: Sat Nov 14, 2009 7:12 pm
by Vegan
On my site, you see a block called NAVIGATION. Its simple HTML at present. What I would like is to show links programatically only if the document is available. Also to have no link for the focus document.
See my site, if you want to see the layout.
Thoughts?
Re: Smarter Menu
Posted: Sat Nov 14, 2009 10:07 pm
by it2051229
so uhmm did you start coding it in php?
like
if(there is content)
{
echo "<a href='#'>Whatever Link</a>";
}
else
{
echo "Whatever Link";
}
Re: Smarter Menu
Posted: Sun Nov 15, 2009 9:22 pm
by Vegan
Yes, I first started with an ad tool, so the next idea was to mechanize the menu. May as well figure out PHP better.
So what is the best conditional test for a file existence?
Re: Smarter Menu
Posted: Sun Nov 15, 2009 10:33 pm
by McInfo
If you reference a site in your post, please provide a link. Some people have signatures disabled (me) and you might change your signature someday.
Further, some people don't want to follow off-site links (me again), so take some time to post some code (only the relevant parts).
Vegan wrote:So what is the best conditional test for a file existence?
PHP Manual:
file_exists()
Edit: This post was recovered from search engine cache.