Martijn Geerts Posted January 11, 2014 Share Posted January 11, 2014 I'm using the url field often to store links from imported RSS items. It would be nice if the URL stored in the URL field could be easily visited with a click. Maybe popup in a magnific-popup. or a target='_blank' Link to comment Share on other sites More sharing options...
tiagoroldao Posted January 11, 2014 Share Posted January 11, 2014 Simple change in the InputField (InputfieldURL.module): public function ___render() { $rootUrl = $this->config->urls->root; if($this->addRoot && !$this->noRelative && !$this->notes && strlen($rootUrl) > 1) { $this->notes = sprintf($this->_("Start local URLs with \"/\" and leave off the \"%s\" part."), $rootUrl); // Instruction for local URLs displayed when site is running from a subdirectory } $out = "\n<input " . $this->getAttributesString() . " />"; $value = $this->getAttribute("value"); if(!is_null($value) && $value !== ""){ $out .="<p class='notes'>WebSite <a target='_blank' href='".$value."'>here</a>.</p>"; } return $out; } renders as: I had never thought of this, although there have been times where this would have been beneficial. This seems something worthy of adding to the core (maybe not done in 2 minutes like mine ) 5 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 16, 2014 Author Share Posted January 16, 2014 Sorry to respond this late, I do think it sould be done client side instead of serverside, as server side is one step to late. I will marinate this for a while till I have some spare time.) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now