Well, I am just playing around, but it is on the user side.
I have it working with a couple 'issues' <g>
In include_common_head.html, I added the following javascript:
<!--
function menu_goto( menuform )
{
if(menuform.dburl) {
var baseurl = 'http://www.supportmusicians.com';
selecteditem = menuform.dburl.selectedIndex ;
dburl = menuform.dburl.options[ selecteditem ].value ;
if (dburl.length != 0) {
location.href = baseurl + dburl ;
}
}
}
//-->
</script>
Then in incude_rightsidebar.html, I have:
<h3>Choose a Template Set:</h2>
<form method="post" action="dummy_value">
<input type="hidden" name="do" value="setup_build" />
<%Links::Tools::tpl_dir_select($cfg_build_default_tpl, '(?:browser|admin)', '', 1)%>
<select name='dburl' onchange='menu_goto(this.form)'>
<%loop template_set_loop%>
<option value="<%env_request_uri%>;t=<%directory%>"<%if $directory eq $theme%> selected="selected"<%endif%>><%directory%></option>
<%endloop%>
</select>
</form>
</div>
global:
return $ENV{'REQUEST_URI'};
}
Works ok, but I need to clean it up.
1) I would like the hard-coded 'base_url' in the javascript to be a tag.
i.e. <%domain%> I know I can create a global tag, I find it strange that
there isn't an existing one hanging around that I could use <g>
2) Do I need the 'hidden' tag in order to obtain the 'template_set_loop'?
I am guessing that the loop is being created via Links::Tools...?
Or, is template_set_loop tag always available to me?
3) Can I obtain $ENV{'REQUEST_URI'} without the global sub?
4) The only 'real' problem is that I am continually appending ";t=foo" to
the current url, so I end up with a messed-up url. i.e.
http://www.domain.com/cgi-bin/links_dev/page.cgi?g=New%2F;t=luna_2C_Banner;d=1;t=luna
So I need help stripping out "t=*;" from the url so I can add it back on :-)
I can do this in the 'env_request_uri' global sub. But how?
Thanks,
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
I have it working with a couple 'issues' <g>
In include_common_head.html, I added the following javascript:
Code:
<script language="javascript" type="text/javascript"> <!--
function menu_goto( menuform )
{
if(menuform.dburl) {
var baseurl = 'http://www.supportmusicians.com';
selecteditem = menuform.dburl.selectedIndex ;
dburl = menuform.dburl.options[ selecteditem ].value ;
if (dburl.length != 0) {
location.href = baseurl + dburl ;
}
}
}
//-->
</script>
Then in incude_rightsidebar.html, I have:
Code:
<div id="rightsidebar"> <h3>Choose a Template Set:</h2>
<form method="post" action="dummy_value">
<input type="hidden" name="do" value="setup_build" />
<%Links::Tools::tpl_dir_select($cfg_build_default_tpl, '(?:browser|admin)', '', 1)%>
<select name='dburl' onchange='menu_goto(this.form)'>
<%loop template_set_loop%>
<option value="<%env_request_uri%>;t=<%directory%>"<%if $directory eq $theme%> selected="selected"<%endif%>><%directory%></option>
<%endloop%>
</select>
</form>
</div>
global:
Code:
sub { return $ENV{'REQUEST_URI'};
}
Works ok, but I need to clean it up.
1) I would like the hard-coded 'base_url' in the javascript to be a tag.
i.e. <%domain%> I know I can create a global tag, I find it strange that
there isn't an existing one hanging around that I could use <g>
2) Do I need the 'hidden' tag in order to obtain the 'template_set_loop'?
I am guessing that the loop is being created via Links::Tools...?
Or, is template_set_loop tag always available to me?
3) Can I obtain $ENV{'REQUEST_URI'} without the global sub?
4) The only 'real' problem is that I am continually appending ";t=foo" to
the current url, so I end up with a messed-up url. i.e.
http://www.domain.com/cgi-bin/links_dev/page.cgi?g=New%2F;t=luna_2C_Banner;d=1;t=luna
So I need help stripping out "t=*;" from the url so I can add it back on :-)
I can do this in the 'env_request_uri' global sub. But how?
Thanks,
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com