Jump to content

Chris Rosenau

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

1,086 profile views

Chris Rosenau's Achievements

Jr. Member

Jr. Member (3/6)

0

Reputation

  1. It is in a for loop that pulls each state. Each listing in the state has a field assigned with a city page. All listings are located as children of the state page. foreach ($pages->get("/states/".$myloc[state]."/")->children as $children) {
  2. I am getting the page ID and I tried to do this: $cityid=$children->co_cities;echo $pages->get($cityid)->title; But it just displays Home, instead of the city name. Anyone have any idea what I am doing wrong? Chris
  3. Problem: I want to have states and each state I want to have cities. I really don't want to make a page for each city as it is very very time consuming the way the system is designed. There are hundreds of cities for each state. So the module field type select seems like an ok option, but I read that it isn't normalized so data could get corrupt. I also wonder about limited ability to search that data with current built in functions like $page->find. Can anyone give me advice on how to deal with large amounts of data? Thanks!
  4. I want to create a field that is called category. When you go to the page and modify this field it would have a drop down list of the categories to choose from. Can this be done and if so how would I go about this? Would each category have to be a page or is there an easier way to do this? I figured out how to do this from this post: http://processwire.com/talk/topic/2319-dropdown-list-using-field-type-page-changing-selection/ Thanks! Chris
  5. Sorry, I have been looking through the API docs but didn't see this there. Also thanks for how to search the forums. Hopefully I will ask something more constructive next time. I love processwire and you guys are super kind for answering my basic questions. One of the problems I found was that the API docs at http://processwire.com/api/ are really basic. I did a search via Google as suggested above and found the full blown API docs located here: http://processwire.com/apigen/
  6. I am going through the DEMO code and I came across this: wire('input')->whitelist('sort', $sort); It appears to be some function, but I can't find it. Can someone tell me what WIRE does and if there is any documentation on it? Thanks! Chris
  7. Thanks that helps me track it down. I am exploring the demo and trying to understand how they created the functionality.
  8. Here is the code: // generate a list of featured skyscrapers. $skyscrapers = $page->skyscrapers->find("limit=3, sort=random"); $content .= "\n<h3>Featured Skyscrapers</h3>" . renderSkyscraperList($skyscrapers, false); Even when I search all the files, I can't discover where the FIND function is. Can someone explain how $page->skyscrapers->find("limit=3, sort=random"); works?
  9. Thanks that is what I needed. They should have that in the config so you can easily re-enter the setting manually if you lose the config.
  10. I accidentally overwrote my site/config.php How do I manually setup the mysql settings so I can reconnect to the database? Chris
  11. I am wondering how $page->bodygets created. I did a serch through the docs and this wasn't listed under the $page section. I notice that each field in the body add a lot of html about a tutorial customizing this. Thanks! Chris
×
×
  • Create New...