Jump to content

Mercury

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Mercury

  1. Thank you all i will implement it like Robin S says and change what is needed.
  2. Hello again, I read some more and i understood some things. Lets say i want to have a list of cars. So that when a car is clicked i go to its individual page. Templates are linked with fields. So i can create an empty template car with all the fields i would put in a database. Then create one page for each car i want. Then for the grid i create a grid template and call the $pages->find returning all cars and displaying them as a grid. First problem, the grid shows less info than all the fields so i get useless info with this call also this grid template uses no fields as far as cars are involved its simply loop-prints and has only one page. Each car item is a link to an individual page. I can use a template for car-display that simply checks the url parameter and $pages->find one car displaying its information. Again no fields on this template as far as cars are involved it simply prints one car information it has retrieved and has only one page. Am i on the right track on this? Is there a better more proper way? Am i tottaly of track? Thanks for all the guidance.
  3. Hello, I am a total newb to processwire but have experience with other cms and frameworks. I saw a video and got a basic understanding of how processwired is used for simple webpages. If i want to get rows from a table i found i can query them like this $result = $this->db->query("SELECT id, name, title, url FROM yourtablename WHERE id=$id"); and i know i could then loop and print the results on a grid with the html. I was wondering is there a way to use partial views in this? Should i use the fields or simply echo these and create fields only for things i fill by hand? If they are links and the page i go to has the respective data how do i go about it? Do i query again for only one row using the id from the url and echo the values? Do i use the fields of process wire in this case? Even if there are different ways to do it i would like the proper one so that i dont regret it later or when i do some expansion. Any advice or link to guides are welcome.
×
×
  • Create New...