As for your 1st question: Internal links don't have a content, however they do have a property that you may access (although undocumented...) so you should be able to do something like this:
Code: Select all
{page_attr page={page_attr page=$child.alias key='page'} key='_dflt_' assign=projectgallery}{eval var=$projectgallery}
However you'd need to make sure that "$child.alias" is an internal link...
As for your 2nd question:
Code: Select all
{if $content_obj->Type() == 'pagelink'}Do something{/if}
The code may need a few tweaks to adapt to your use but the concept does work - I have tested it.