Update: Is there an another way to get just the value out of the page content type field?
Yes, you You can only get the value out of page Content Type field:
in using the C#, it would be like:
string valueoffield = (string)SPContext.Current.ListItem["YourContentTypeFieldName"];
Remember: By default code blocks are not allowed on Master pages or Page layouts, but can allow them in web.config using the following code:
<pageparserpaths>
<pageparserpath virtualpath="/_catalogs/masterpage/*" compilationmode="Always" allowserversidescript="true" includesubfolders="true".>
</pageparserpaths>