or in other words get rid of the /id/ in the address bar.
I have the following specified in urlManager:
'<controller:\w+>/update/<sid:\w+>'=>'<controller>/<action>'
which means I need to specify the following in the url address bar:
mysite.com/post/update/sid/s390seret88se
How can I configure it so that all I need is:
mysite.com/post/update/s390seret88se
I don't want the sid to be visible in the address bar.
If you want hide sid only for update action do this
'<controller:\w+>/update/<sid:\w+>'=>'<controller>/update'
Or if you want to update for all actions use
'<controller:\w+>/<action:\w+>/<sid:\w+>'=>'<controller>/<action>'
Related
I'm trying to add just one parameter to my postback url to a custom partner. What I need is to pass a Click Id that advertiser will put into link. For example hi'll make traffic to this link - cq8y2.app.link/?click_id=777 how could i map that click_id parameter to postback url?
You should use a macro to extract the click_id value. Append to the postback URL as a GET-parameter the following:
?clickid=${ (last_attributed_touch_data.~click_id)! }
I have a controller called ExpenseController. So the url becomes www.website.com/Expense/ViewName
How do I make the url be instead "www.website.com/HPQExpense/ViewName" without changing controller and folder name?
I want to append "HPQ" to all the controllers based on certain condition. So if condition is true url will be like "www.website.com/HPQExpense/ViewName" else it will be "www.website.com/QBLExpense/ViewName".
Thanks!
I have a view file called "user" .There it has a select tag called 'uid'.I will select a user id from the select tag and click on 'add' button.When I click 'add' button it will redirect to another view called 'projects' . There I have a select tag called 'userID' I want to set the value of this option to 'uid' which I have selected in 'user' view. How can I do this?
I don't want to pass the variable in url
I have never worked on PHP but you can try one of the following options:
You can pass that value in URL and access it on project view.
eg: /project/uid=1001
Use can store on client side using Local Storage or Session Storage.
http://www.gwtproject.org/doc/latest/DevGuideHtml5Storage.html
You can also use Route Parameters:
Use following link: http://www.yiiframework.com/doc/guide/1.1/en/topics.url
Hope this might
I have a form on one page which prompts a user to enter their email address. When they click "next" I want Apex to redirect the user to a different page which shows them a report which selects the records from the users table where the email address matches the one that they entered.
E.g.
SELECT *
FROM USERS
WHERE EMAIL_ADDRESS = (the email address that they entered on the previous page);
Can someone please explain the easiest way to do this?
I have only in the last 5 seconds heard about 'Apex' Lol ... But I think I found what you need to do.
You need to define a 'Branch' which will allow you to POST to whichever page you need to.
Here's some documentation on 'Branches': http://docs.oracle.com/cd/B32472_01/doc/appdev.300/b32469/pdf_report.htm#BABICIJG
Also this snipet may help:
It's [The 'branch'] in the middle (page processing section) of the
development page at the bottom. The branch will be executed whenever a
post submission occurs but you can put conditions on the branch.
Which I found at: http://dbaforums.org/oracle/index.php?showtopic=8139
The "Next" button should not redirect but should submit. The value of the page item has to be pushed to the session state for it to be available in the (apex) session. On submit you can then define a branch which will take you to the page with your report. Your report can then reference the page item by using bind variable notation in the region source:
SELECT * FROM USERS WHERE EMAIL_ADDRESS = :Px_EMAIL_ADDRESS
I'd like to make a menu in Layout which the items are linked to other different module.
e.g:
Item "Product" linked to an action in Product Module, item "Service" linked to an action in Service Module.
It won't work when I set the 'url'=>('product/<controllerID>/<actionID>') and 'url'=>('service/<controllerID>/<actionID>') because once we're in Product module and click the menu "Service", the URL become
index.php?r=product/service/<controllerID>/<actionID>
instead of
index.php?r=service/<controllerID>/<actionID>
and it will be 404 error. (for sure, because the Service Module isn't inside Product Module but the URL makes it looks like that).
Any solution for this?
Check the createUrl() documentation :
the URL route. This should be in the format of 'ControllerID/ActionID'. If the ControllerID is not present, the current controller ID will be prefixed to the route. If the route is empty, it is assumed to be the current action. If the controller belongs to a module, the module ID will be prefixed to the route. (If you do not want the module ID prefix, the route should start with a slash '/'.)
That last line tells us everything. Best thing to do for you is start all the routes with a / :
'url'=>array('/<moduleID>/<controllerID>/<actionID>')
Check this
'url'=>$this->createUrl('/<moduleId>/<controllerID>/<actionID>')