We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question

If URL contains value

I am using a template in runway for a whole load of pages in a site. Most of the pages are quite simple but others need some additional content adding from elsewhere in the site. What I thought I'd do is look at the url and display the additional content.

I am using:

if ($url == 'link-1') {
                            echo '[insert custom content] ';
                          } else {
                            echo '[do nothing]';
                          }

I'm sure there's a simple solution?

Similar forum post here http://forum.grabaperch.com/forum/01-30-2015-testing-for-string-fails

Ben Stillwell

Ben Stillwell 1 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you populating $url?