Closed (fixed)
Project:
Simple Field Formatter
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
29 Nov 2012 at 01:24 UTC
Updated:
27 May 2013 at 15:41 UTC
Great module!
One thing I'm using it for is replacing the node title field with an entity field, giving much greater flexibility of where the title is displayed, and also enabling titles to include a line break.
I can add a H1 tag for the page title and a H2 for teaser title, but need to link the field to it's node and strip out HTML on the teaser.
I'm going to add these two options, would you be interested in including them in the module? Or should I add them via a separate module?
Comments
Comment #1
technikh commented"Strip Out HTML" Yes.
Not sure about linking to node. How are you planning to implement? This is a general purpose field formatter. If you can make it to work/hide for fields of a taxonomy vocabulary or a User profile field then it will make sense.
Please provide the Patch and I will be happy to add to this Module.
Thanks.
Comment #2
technikh commentedAdded "Link to Node" option in the new dev version.
Comment #3
robert castelo commentedHi Nikhil,
I've used this for the custom link so it can be used on any entity type:
Comment #4
robert castelo commentedHere's the code for stripping out HTML:
Comment #5
robert castelo commentedWould you like a patch for these?
Comment #6
technikh commentedThanks Robert. I will manage without patch.
I guess I will add "preserve tags"(allowable tags) textbox for the strip tags feature.
http://www.w3schools.com/php/func_string_strip_tags.asp
strip_tags(string,allow)
Parameter Description
string Required. Specifies the string to check
allow Optional. Specifies allowable tags. These tags will not be removed
Comment #7
robert castelo commentedNice idea, that gives a lot of flexibility!
Comment #8
technikh commentedStrip tags feature with option to allow specified tags is committed and released as 7.x-2.0-alpha4
http://drupalcode.org/project/simple_field_formatter.git/commit/2134547