I know this can be done using PHP (is_numeric).
But can EE conditionally check if segment_X is numeric?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
August 09, 2012 3:40pm
Subscribe [1]#1 / Aug 09, 2012 3:40pm
I know this can be done using PHP (is_numeric).
But can EE conditionally check if segment_X is numeric?
#2 / Aug 10, 2012 10:44am
Hi, boldyellow -
You can test for a specific value in a segment, but not for a type of value. If you need to test for the type of content in a segment, a custom plugin is likely to be your best option. I did do a search on devot-ee for ‘segment’ but didn’t find anything that seemed specific to your needs.
Would you like me to shift this down to Community Help in case others have some input? A feature request might also be a good idea here.
Thanks!
#3 / Aug 10, 2012 11:27am
Didn’t seem like there was, but wanted to check anyways.
It seems relatively basic and I should be able to build a plug-in for it.
So we’re good Lisa, you can close… thanks!
#4 / Aug 10, 2012 11:41am
Glad to hear you have a plan for moving forward. Have a wonderful weekend and please let us know if you need any more assistance!