Versions

PHP_Add_Query_To_Links.zip (2009-02-24) (Downloaded 20 times)

Contains:

  • PHP Add Query to a Link (item-action) - v. 1.2
  • PHP Add Query to a Link (item-action) - v. 1.2

Compatible: Pro 3.5, Pro 4, and Pro 5

Author: Softpress Support

In order to pass a variable from one page to another, you need to send it as a query on a link; you may have seen URLs like this: http://www.mydomain.com/index.php?variable=1

Most e-commerce sites do this in one form or another. There are two actions for this effect. One for images and one for text.

Application

This Action is applied to an image. Select the graphic you want to apply the link to, and select it from the Actions sub-menu in the Item menu. You can add PHP variables if the action is contained within a PHP Block Action. Each line is a new query. The ? and & between each query is created by the Action.

The PHP Text Link With Query is applied differently, but the Actions Palette works in the same way to the PHP Add Query to Link Action.

This Action is applied within the text flow.

Use Insert>Action to find it. Enter the text that you want to be used as a link in the My Text field. The URL is a normal drop-down of all the pages in the site.

Code Produced

<a href=“testpage.php?myVariable=1&myNewVariable=$count” onfocus=“blur();”>
<img src=“Resources/testpa1.gif” border=“0” width=“108” height=“29” alt=“”>
</a>

And the text link Action:

<a href=“testpage.php?myVariable=1&myNewVariable=$count”>This is the text for the link</a>

0 Comments

Sign In or to comment.