er... I already did :)
I just didn't want your templates full of id's!, I thought it would be more readable to use a label and then hide the ugly hardcoding of ips somewhere else,
function InSection($strPageName) {
if ($strPageName=='mypagename') {
//find page
$doSiteTree = DataObject:get_by_id('SiteTree',HARDCODEYOURIDHERE);
}
}
I think the confusion is with "PageName" that is just a label string you would use to identify in the template to make it readable and then within your function in the controller you actually have the id. I do think you need something else here as hardcoding lookups by id are not a great idea.
If all of these Pages are of type "Page" you are going to have to reply on some of the data that the user could change. If each page is a different type and they are allowed only one type of page (although again if it's a user they will probably create two pages of that type :) I love users - I'm one myself).
You could always add a literal field, that places a label above the page url saying "CHANGE THIS AND DIE!!!! xx hugs janulka" :)