internal link to "search by property"

2 views
Skip to first unread message

DanielTahar

unread,
Jun 27, 2009, 10:52:22 PM6/27/09
to Semantic Forms
hi, this may have been asked but i couldn't find it. say i have a
property called "Favorite Soda", and I want to make each page's data
link to the list of other pages using the same data. How do I do that,
if the field has a space?

basically, i want someone who put in "coca cola" to have those words
become into a link that leads to the other pages that have "coca cola"
as the favorite soda field. I don't know if it's the space, the ":",
the "&", but for some reason i can't get it to work... thanks

Dan Bolser

unread,
Jun 28, 2009, 5:43:04 AM6/28/09
to semanti...@googlegroups.com
This should happen when you click the little magnifying glass next to
the property value in the fact box, which is a link to something like:

http://.../Special:SearchByProperty/Favorite-20Soda/Coca-20Cola


When you say that you can't get it to work, can you give a few
examples of what you're trying, what you expect to happen, and what
actually happens?

HTH,
Dan.

2009/6/28 DanielTahar <dtah...@gmail.com>:

DanielTahar

unread,
Jun 28, 2009, 9:18:46 AM6/28/09
to Semantic Forms
well, when i click the magnifying glass it works great; thing is, i
want to basically copy the magnifying link to a direct text link (i
don't want to use the magnifying glass). so, let's say, i have a form
like this:

Name: {{{Name|}}}
Favorite Drink: {{{Favorite Drink|}}} (let's say someone fills out
"coca cola")

I want to make favorite drink link to searchbyproperty for "favorite
drink = coca cola". i want to convert the magnifying glass to wiki
markup basically i guess...

On Jun 28, 5:43 am, Dan Bolser <dan.bol...@gmail.com> wrote:
> This should happen when you click the little magnifying glass next to
> the property value in the fact box, which is a link to something like:
>
> http://.../Special:SearchByProperty/Favorite-20Soda/Coca-20Cola
>
> When you say that you can't get it to work, can you give a few
> examples of what you're trying, what you expect to happen, and what
> actually happens?
>
> HTH,
> Dan.
>
> 2009/6/28 DanielTahar <dtahar...@gmail.com>:

Yaron Koren

unread,
Jun 28, 2009, 10:52:08 AM6/28/09
to semanti...@googlegroups.com
The standard, and I think best, way to do it, is to make the "Favorite Drink" property be of type "Page", and then have each possible drink have its own page, with a query listing users, etc. who like that drink. If you use a template to hold that query, create a form for the template, and associate that form with "Favorite Drink", it should be pretty easy for users to add new drinks. This approach also lets you add more information on drinks, if that makes sense for your wiki.

-Yaron

DanielTahar

unread,
Jun 28, 2009, 10:56:21 AM6/28/09
to Semantic Forms
Yaron, first of all, good to hear your voice again! hope all is well.


How will I dynamically create this though? If someone adds in "Dr.
Pepper", that link will automatically be to the AddData: for page "Dr.
Pepper"; I want it to automatically link to a query of "who chose Dr.
Pepper". Any way of doing that?

Yaron Koren

unread,
Jun 28, 2009, 11:05:16 AM6/28/09
to semanti...@googlegroups.com
Hi, it's good to hear from you as well. The issue is, that I think it's better to have queries contained on "dedicated" pages. If you really want to link to a query, though, it should be possible; it might help if you included the wiki-text you tried, to make debugging easier.

I should note that this sounds more like a question for the semediawiki-user list, for the record...

-Yaron

Dan Bolser

unread,
Jun 29, 2009, 6:51:59 AM6/29/09
to semanti...@googlegroups.com
2009/6/28 DanielTahar <dtah...@gmail.com>:
>
> Yaron, first of all, good to hear your voice again! hope all is well.
>
>
> How will I dynamically create this though? If someone adds in "Dr.
> Pepper", that link will automatically be to the AddData: for page "Dr.
> Pepper"; I want it to automatically link to a query of "who chose Dr.
> Pepper". Any way of doing that?

Modifying Yaron's (standard) method slightly, just add a big text to
the form that says 'click save to see a list of like-minded drinkers'
(or whatever). Then they know that they don't have to fill in any
details about Dr Pepper... not sure what happens if the form has no
data fields...

Otherwise you could edit the template for the form where the user adds
there favourite drink and code an explicit link for the parameter. You
can do what you want within that template, its only convention that
means it sets out a little table of property values.

HTH,
Dan.
Reply all
Reply to author
Forward
0 new messages