rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Guest on January 16, 2008, 03:36:26 PM
-
Is there a way to use a macro for a ip range like, 192.168.1.20-192.168.1.40 ?
Read the forum macro section and the wiki. Tried to modify some examples I
found for ip's with no luck. Not having much luck understanding macros.
I need it to work as:
if in this ip range then display this [section] but if not, display nothing.
Thanks
-
{{if |{{match|127.*;10.*;192.168.*|%ip%}}| {{$section}} }} Is what i use for specific addresses.
If you had read the Wiki http://www.rejetto.com/wiki/index.php?title=HFS:_Template_macros you would have seen this for IP ranges.
match address | A | B
just like the macro match, but the mask supports ip ranges like 10.0.0.1-10.0.0.25
Soo... something like this I would assume.
{{if |{{match address|192.168.1.20-192.168.1.40|%ip%}}| {{$section1}} | {{$section2}} }}
-
Thanks T.S.G.
Went back and looked at the wiki, don't know how I overlooked it.
Anyway, it worked.
Thanks again.