Redirect to an external page from a specific article - Drupal 7 - drupal-7

I'm very new with drupal.
I have a blog, List of posts.
I need redirect a specific post to a specific external webpage, Is this possible ?
By example: I need to redirect the post (with the arrow red) to www.facebook.com/somePage. (if it's possible in other tab)
But the other posts should be redirect normally to its internal pages.
In this moment I have this configuration:
Any suggestions?

Method 1
Add a URL Redirect pointing from the 'node/#' URL to your external URL.
Render View as you have it now, and when you click the article Title it'll send you to the external page.
Method 2
Install the 'Link' module.
Add a 'Link' field to your Content Type. Configure the link field to open links in a new window, and so on.
Add that new field to your View. Set it to not appear in display, so it can be used later. Move this link above your Title Field in the View, because the order matters.
Edit the Title field settings and use the Link field value as a Token for the Title field.

Related

Open external URL in same window using hyperlink formula in Salesforce Site(Lost invocation url)

I have a custom formula field and I am using the below sample formula to navigate to the external URL in the community:
HYPERLINK('http://myUrl.com', 'Salesforce', '_self')
The tab is open in the same page, but I lose the URL from where I click to the new link.
I need this URL to later use Document.refferer (i dont want history.back())
If i use "_blank", i have the last url and i can use Document.refferer.
Any ideas?

To show different list page for different profile

I have two vf pages, say vf1 and vf2, which have standard controller for same object say Leads. Now i want to show vf1 page for edit button for any profile1 and and vf2 page for profile2 on edit button.
Tried to see any option in Profile menu, but not able to find anything for page assignment for list/edit/create/...etc. for an object.
There is no such feature in Salesforce to allow visualforce page assignment per profile.
I would recommend below
1.Create a hirerachy custom setting to store the mapping between the vf page and the profile .
2.Write a vf that will be assigned for all profiles but on action (called upon where page loads) it will look into the hirerachy custom settings map and takes the user to right visualforce page .You can pass along page parameters as query parameters .

DotNetNuke. How to get current url or ID of page (and frontpage)?

I`m use my custom template. In file CustomTemplate.ascx need to control somethings elements.
If your control inherits from PortalModuleBase you will have a property called "TabId" that will give you the id of the current page.
To get the URL for that page you can use DotNetNuke.Common.Globals.NavigateUrl(TabId);
To get the URL for the homepage, you can use PortalSettings.HomeTabId and the same NavigateUrl Method.
The current Url is also obtained by using the Context.Items("UrlRewrite:OriginalUrl"). This is the Url the page was requested with (which is different to the Request.Url or Request.RawUrl value, which is the rewritten Url.

cakephp back button issue

i am working on social network website where user can navigate to the album view page in many ways.
for example.
myprofile>> Gallery index page >> Album view page.
myprofile>> Gallery details page >> Album view page.
In first case back button should go to gallery index page and In second case it should go to Gallery details page.
Is there any way to add link to back button path dynamically in cakephp?
You could try using a breadcrumb-like session array. With every view you can pop a path onto the stack, and access the stack in the view (via the Session Helper) and construct the back button that way.
The stack could be as simple as a single parameter, or an array of controller, action and parameter variables to construct the path, depending on how much detail you need.
Edit: You could also use Neil Crookes' History Component: https://github.com/neilcrookes/cakephp-bits/blob/master/history_component/controllers/components/history.php
Use the breadcrump methods in the Html helper.
In your layout:
echo $this->Html->getCrumbs(' > ','Home');
In your view:
$this->Html->addCrumb('Users', '/users');
$this->Html->addCrumb('Add User', '/users/add');
In each of your views, you can add in a new crumb, or the chain of crumbs to be able to see a history of your actions.
More here: http://book.cakephp.org/view/1653/Creating-breadcrumb-trails-with-HtmlHelper

Salesforce: Launch S-Control in a new window from VisualForce

I'm writing a VisualForce page to replace an old legacy S-Control.
Originally the Custom S-Control was launched from a Custom Button, and it opened in a new browser window (The S-Control is type HTML, and the Custom Button has Behavior: Display in new window)
For certain old records, I want to do a similar thing from VisualForce.
So: Do HTML S-Controls have a URL that I can launch using a link? In which case, how do I figure out the URL?
Or:
Is there a way of embedding 'Custom Buttons' (that is, the buttons defined in "Setup->Customise->Account->Buttons and Links") into VisualForce pages? If so, I can embed the existing button that knows how to open the S-Control
Or:
Can you suggest some other way of doing this? Key features: Open an S-Control in a new window from VisualForce.
Thanks
Got an answer from this forum post courtesy of aballard:
Basically, the !Urlfor() function can be used to get the URL of an S-Control. So, you can use an outputLink like this:
<apex:outputLink value="{!UrlFor($SControl.my_scontrol_name)}"
target="_blank">Show SControl</apex:outputLink>
If you need to pass an object ID to the S-Control, you can add a second parameter that calls a propery on the custom controller, e.g:
<apex:outputLink value="{!UrlFor($SControl.my_scontrol_name, AccountID)}"
target="_blank">Show SControl</apex:outputLink>
... where AccountID is defined on the custom controller as public string getAccountID()
See also this blog post at SalesforceSource for more info on the UrlFor function.

Resources