That doesn't seem to work for me.  This is what I have in my template:
    {{#show:{{PAGENAME}}|?Has length of hike}}
...and this is the HTML that shows up:
    1.2 miles1.931 km
As you can see, there are no divs or other elements that have IDs of
"smwttcontent", so adding the above to MediaWiki/Common.css has no effect.
 Here is an example of a page with that template; there are four numbers
that have units in it:
http://ropewiki.com/index.php/Napoleon_Falls

How can I get my quantities to display their units correctly?


On Sat, Nov 23, 2013 at 9:16 AM, Leonard Wallentin
<leo.wallen...@gmail.com>wrote:

> If the printout is actually "100 ft30.48 m" it probably means that you
> have javascript turned off, or that something is wrong with the scripts
> served. I use this  css hack to serve something slightly more readable to
> non js users:
>
>
> .client-nojs .smwttcontent {
>
>    1. font-size: .7em;
>
> }
>
> .client-nojs .smwttcontent:before {
>
>    1. content: " (";
>
> }
> .client-nojs .smwttcontent:after {
>
>    1. content: ")";
>
> }
>
> (see http://xn--ssongsmat-v2a.nu/ssm/Recept:Aloo_Palak)
>
> /Leo
>
>
> _______________
> Leonard Wallentin
> http://leowallentin.se
>
>
> 2013/11/23 Benjamin Pelletier <bjpcalt...@gmail.com>
>
>> I have a Semantic template that has a few quantity inputs I'd like to
>> display on the page.  I could do this:
>>
>> [[Has longest rappel::{{{Longest rappel|}}}]]
>>
>> But that works poorly because the user can enter 100, 100 ft, 100 feet,
>> 30.48 meters, etc and all those inputs are identical in the database, but
>> get displayed differently.  It seems I can get around this by doing
>>
>> {{#set:Has longest rappel={{{Longest
>> rappel|}}}}}{{#show:{{PAGENAME}}|?Has longest rappel#-}}
>>
>> But man, that seems ugly, long, and inefficient.  Is there a better way?
>>
>> Also, separately, the Display units for Has longest rappel consist of two
>> units (ft and m), and the output of
>>
>> {{#show:{{PAGENAME}}|?Has longest rappel}}
>>
>> is actually
>>
>> 100 ft30.48 m
>>
>> Why is it displayed that way (pretty much useless) instead of
>>
>> 100 ft (30.48 m)
>>
>> ...like it is on, say, the Browse properties page?
>>
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up
>> now.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Semediawiki-devel mailing list
>> Semediawiki-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
>>
>
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to