theCrag / website

theCrag.com: Add your voice and help guide the development of the world's largest collaborative rock climbing & bouldering platform
https://www.thecrag.com/
110 stars 8 forks source link

QR print code page to show all areas when nested #1959

Closed brendanheywood closed 9 years ago

brendanheywood commented 9 years ago

ie

http://www.thecrag.com/climbing/australia/queensland/brisbane/rocksports-indoor-climbing?gym=red,blue,green,purple,black

only shows the rooms, not the ropes which is what we need. At the moment you have to go to 6 pages to get what you need.

scd commented 9 years ago

This is a bit of a pain, as it needs different template data. Maybe rather then children I get descendant features? On Jul 19, 2015 8:24 AM, "Brendan Heywood" notifications@github.com wrote:

ie

http://www.thecrag.com/climbing/australia/queensland/brisbane/rocksports-indoor-climbing?gym=red,blue,green,purple,black

only shows the rooms, not the ropes which is what we need. At the moment you have to go to 6 pages to get what you need.

— Reply to this email directly or view it on GitHub https://github.com/theCrag/website/issues/1959.

brendanheywood commented 9 years ago

This will easy if we call the alternate template from the crag guide page as its all ready to go there. Will see how required it is first with this gym, I have a feeling they might be doing custom tags??

Sent from my iPhone

On 19/07/2015, at 9:20 AM, Simon Dale notifications@github.com wrote:

This is a bit of a pain, as it needs different template data. Maybe rather then children I get descendant features? On Jul 19, 2015 8:24 AM, "Brendan Heywood" notifications@github.com wrote:

ie

http://www.thecrag.com/climbing/australia/queensland/brisbane/rocksports-indoor-climbing?gym=red,blue,green,purple,black

only shows the rooms, not the ropes which is what we need. At the moment you have to go to 6 pages to get what you need.

— Reply to this email directly or view it on GitHub https://github.com/theCrag/website/issues/1959.

— Reply to this email directly or view it on GitHub https://github.com/theCrag/website/issues/1959#issuecomment-122604287.

scd commented 9 years ago

I thought about doing it this way, but there is a bit of template swapping, then some code additions to the template to make sure you are showing the rope features. Also there are some historical arbtrary limitations on crag guide data (eg 500 routes) which I don't like, and is probably ok for smaller gyms.

I think the smallest code change will be replacing child query with descendant feature query in the same data template.

If Thomas is using this we should definitely fix it, if not then hold off. Do you want to ask Thomas how he is doing it.

scd commented 9 years ago

hot fixed. It was just a couple of lines to replace children with all area descendants when gym card trigger conditions are meet.

Actually as a useful by product we get all areas (not just ropes) including the gym itself.

brendanheywood commented 9 years ago

demo url? I couldn't see this working

scd commented 9 years ago

The url you posted above:

http://www.thecrag.com/climbing/australia/queensland/brisbane/rocksports-indoor-climbing?gym=red,blue,green,purple,black