Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2012-02-01 19:27:38
- milosevic
- Member
- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Alphabetical list like google maps (A,B,C,...)
Hi:
I would like to display a list (using article_custom) and a map geolocating the results, like local.google.com:
For instante, listing 10 results per page:
A – 1st result
B – 2nd sencond result
C – 3th result
…
K – 10th result.
< pagination >
secong page:
A – 11st result
B – 12nd sencond result
C – 13th result
…
K – 20th result.
I got solved the query to obtain the results, the map, but… How can I assign a letter to each result per page (A,B,C,D…K)?
Last edited by milosevic (2012-02-02 12:56:28)
<txp:rocks/>
Offline
#2 2012-02-01 20:04:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Alphabetical list like google maps (A,B,C,...)
ol { list-style-type: upper-latin; }
Not supported by IE I think…
Offline
Re: Alphabetical list like google maps (A,B,C,...)
list-style-type: upper-latin;
is supported by IE8 and up.
However, the seemingly identical list-style-type: upper-alpha;
is supported by IE5.5 and up, so use that if you want.
Offline
#4 2012-02-01 22:56:25
- milosevic
- Member
- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Re: Alphabetical list like google maps (A,B,C,...)
Thanks guys, but the CSS way is not valid sollution. The CSS letters are content generated by the browser on client side, and I really need to control the letters asigned to the results in order to relationate the HTML results with the markers on the map, make a hover effect on the HTML letters with equivalente hover effect on markers letters to enfatize that relationship, etc.
So the question is still alive: there is a smart way to assign a consecutive letter to each result on an article custom form? I’m thinking on something like using adi_calc but with letters instead of numbers, but don’t know if someone invented such kind of plugin or if there is a php function to assings letter following alphabetic order.
Last edited by milosevic (2012-02-01 22:58:02)
<txp:rocks/>
Offline
#5 2012-02-02 12:58:50
- milosevic
- Member
- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Re: Alphabetical list like google maps (A,B,C,...)
I found a solution!
<txp:article_custom form=“alpha-results” limit=“10”/>
form alpha-results:
<txp:rah_repeat value=“A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,W,X,Y,Z”>
<li><txp:rah_repeat_value/> – <txp:title/></li>
</txp:rah_repeat>
And that returns:
A – title first article
B – title second article
…
J – title tenth article
OH, NO, this is not a solution, the letters are ok, but no re result. I will play with it a bit more.
Last edited by milosevic (2012-02-02 13:04:19)
<txp:rocks/>
Offline