Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

test url = default value?

$
0
0

Replies: 0

For the Virtual Post ‘URL pattern to match’ I have defined ‘^folder/subfolder/(.*)/?’, with ‘post_title’ set to ‘$1’.

I then load ‘http://domain.tld/folder/subfolder/’.

If I’ve defined a ‘Test URL’ of ‘/folder/subfolder/something’, then ‘$1’ is set to ‘something’, ‘post_title’ = ‘something’, and the returned AirpressCollection matches on ‘something’.

If ‘Test URL’ is set to ”, ‘$1’ is set to ”, ‘post_title’ remains the one entered in the template, and the returned page states ‘no data found’.

In AirpressVirtualPostsAdmin.php, I see ‘Test URL’ maps to ‘$defaults[‘default’]’. I’m not sure you want a default value here, but, if so, it should probably be documented as such.

Thanks!


Viewing all articles
Browse latest Browse all 67836

Trending Articles