select element_id,
name,
sort_key,
state,
hideable_p
from portal_elements
where page_id = :page_id
and region = :region
and state != 'hidden'
order by sort_key
select portal_elements.element_id,
portal_elements.name
from portal_elements,
portal_pages
where portal_pages.portal_id = :portal_id
and portal_pages.page_id = portal_elements.page_id
and portal_elements.state = 'hidden'
order by portal_elements.name