well i was able to resolve some of the problems, and was able to remove the hyphens and capitalize the first char of the county. But for example now i am getting "San luis opispo", but i am thinking instead of writing all the js for the string manipulation, if i could just use the County name that was in the breadcrumb, ( which i think i was doing using "pathway"
array), if i could use the county as it appears in the loop it would be easier.
so for example i am using [types field="cdf-county" output="raw"] in the loop,
are any of these kinds of fields usable in the js panels?
Well, you can't add the shortcode itself to the JS editor, so what you will need to do is to get the output text from the frontend directly using the JS.
From there you can manipulate that text however you want to.
ok, can't use the shortcode.
but from "get the output text from the frontend directly" i am not sure what that means.
if i have a url like hidden link
i have i think the san-luis-obispo part, but am lazy to see how i can convert that to San Luis Obispo.
( i have gotten so far as to have San luis opispo).
is the url what you mean from the frontend? or is there something else?
thanks
oh i am now thinking you might be saying i could use css for that term.
in using the css i could wrap the county in something like
<span class="countyname">
and text-transform the thing.
in using the css part, do i need to use the <style> tags?
Hi ,
its text that i want to place on the page and the code is in the wordpress archive panels.
so on the page hidden link
i am adding the text there that says
Probate Attorneys in San luis obispo
i got the county name from the url and am using it in the text area.
i have the following code
var pathname = jQuery(location).attr('pathname');
var pathArray = window.location.pathname.split( '/' );
//alert ('pathArray is ' + pathArray);
//alert ('pathArray length is ' + pathArray.length);
//alert ('pathArray[3] is ' + pathArray[3]);
//alert ('pathArray[4] is ' + pathArray[4]);
var state = pathArray[2];
var county = pathArray[3];
//state = state.toLowerCase().replace(/b[a-z]/g, function(letter) {
// return letter.toUpperCase();
//});
state = state.toLowerCase();
county = county.toLowerCase()
if (rowCount == 0 )
jQuery("#myButton").click(function ()
{
history.back();
});
and would like to improve it, by having the different parts of the county name in caps, when it has more than one space and two parts to its county name. i am thinking i can use css to do a text-transform now. so in the css panel below the js panel would i use something like
text-transform:capitalize;
if so, i don't know whether toolset css panel would have the <style> tags or not, or just the rules.
e