Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 4 Jahren, 10 Monaten
Letzter Beitrag:
vor 4 Jahren, 10 Monaten
Beteiligte Autoren:
willy hermans, Piet van Zanten, Alexandre Leclerc

Facebook Dynamic Link

Startbeitrag von willy hermans am 27.05.2013 20:06


In my CMS (a local newspaper) each visitor can like a selected article.

Each article has an aricleID.

It is only possible to add a literal URL. I can not add a dynamic url with the articleID as a parameter.

Is there a way to manage the URL. The goal is : "When a person clicks in Facebook, he has to go to my site and the selected article has to be on top"

So the URS must be different for each article.

Willy Hermans


Hi willy,

You can use rewrite rules on the server. (I do it manually, I did not had the occasion to test what is available in WebDev in this regard.)

- For the "like" you could generate a fake URL like: www.site.com/article/id10/title-of-article.html
- In your web server rewrite rules, you trap all URL beginning with /article/id then you extract the number (10 in this example) and discard the rest of the URL.
- Finally, you rebuild the good URL internally usgin this ID: www.site.com/article.awp?id=10

This is not an easy suggestion to implement would work.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 27.05.2013 20:38
I think that does not work.

"- For the "like" you could generate a fake URL like: www.site.com/article/id10/title-of-article.html"

This fake URL alreadey contains the article nr. With a replace the url can be changed.

The big problem is that I can only define an URL for the whole page. Not for each article.
There should be something like 'onclick' where I can define an url per article.

Is it possible that the facebook control is not yet an adult control.


von willy hermans - am 28.05.2013 06:41
Hi Willy,

Perhaps you should pose a question to PCSoft Tech support to find if there is a more elegant solution, but if there isn't, you could try some javascript.
I have not tested this, but it might work.
See http://www.webdeveloper.com/forum/showthread.php?22003-onload-goto-anchor-how-sorry-for-such-a-simple-question!!
The principle is that you make the page jump to an anchor (in the html sense) in the onload code section of the page.
For that you can use the alias (=id) of a link on your page.
Create a link and hover over it to see the id (looks like [A20] )
For the page you add an extra parameter for the article id.


von Piet van Zanten - am 28.05.2013 08:01

A huge job for a beginner like me.

I've send a request to PC soft. So I shall have to wait a few days.

I've looked at some javascript code.

Very complex. I shall have to do this step by step.


von willy hermans - am 28.05.2013 11:03
Hi Willy,

How are you displaying the articles?
(using what control types and how are they arranged?)


von Piet van Zanten - am 28.05.2013 11:27

I use 2 loopers.

I made a query to select the 14 articles thhat are displayed.

I fill the looper by programming. Each looper has 7 articles (at this moment)

Each cell has an HTML controll.

The goal is to place also a 'like' button from Facebook etc. in every article-cell

The loopers are working fine except that there can be a great difference in height between the two loopers.

You can see it at www.kb-actief.be It is in very early testmode.


Willy Hermans

von willy hermans - am 28.05.2013 14:14
Hi Willy,

In this case you might be able to use Looperposition to position the looper on the required article.
I say "might" because in my experience the TablePosition and LooperPosition function are not very reliable in Webdev.
But then again, you might be lucky ;)


von Piet van Zanten - am 28.05.2013 14:23
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.