Hi,
I have a LG_Image_Manager section field ‘callout_image’ where I pass a relative image url (eg /path/to/image.png).
My problem is that when I call the entry out on the frontend the first entry is wrapped in a p tag, however, subsequent entries are called out as expected.
I’ve set Section Posting Preferences ‘Allow image URLs in section entries?’ to No and Yes with the same result and I set ‘Automatically turn URLs and email addresses into links?’ Likewise.
Can anyone tell me how to get rid of the p tags without hacking it?
Cheers, Eoghan
Moved to Extensions by Moderator
If you have tags surrounding one entry but not others then this is usually due to the field not in the beginning having its field formatting set to None and instead being set to XHTML. This can be easily fixed though by going to :
Admin->Weblog Administration->Custom Weblog Fields->Add/Edit Custom Fields (Your Field Group)->Your Field Name->Default Text Formatting for This Field
Ensure this is set to None. If not then change it and make sure to tick the checkbox at the end of the page before updating that fields settings. This will then apply that format setting to all other existing weblog entries which should then get rid of the tags.
Hope that helps a bit.
Best wishes,
Mark
If anyone is interested, I ended up creating a plugin, pi.strip_tags.php which basically uses the PHP function strip_tags() and accepts one parameter for allowable tags. I dont like having to turn on PHP parsing in EE for simple things like this so this was perfect for me.
Usage:
{exp:strip_tags allowable="<p><a>"}This <em>is</em> <strong>a</strong> <a href="http://google.com">link</a>{/exp:strip_tags}
Before: This is a link
After: This is a link
it seems to have worked for the other entries, the first entry no matter how I sorted the entries would always be wrapped in tags, I didn’t really have the time to go in to more detail on it
Okay. Glad you have something sorted out now although it would have been nice to find out what was causing that problem so that hopefully it doesn’t happen to you again in the future.
One other thing you could always do of course would be to delete that entry and just re-create it again, that should get rid of the problem too of course.
Best wishes,
Mark
One other thing you could always do of course would be to delete that entry and just re-create it again, that should get rid of the problem too of course.
That’s what I tried before making the plugin but that did the same thing, whichever entry was first always got wrapped in p tags.
Cheers
One other thing you could always do of course would be to delete that entry and just re-create it again, that should get rid of the problem too of course.That’s what I tried before making the plugin but that did the same thing, whichever entry was first always got wrapped in p tags. Cheers
That’s truly weird and the only thing I can think of now is that there is something up with the LG Image Manager as I wouldn’t have thought it could really be anything else really.
Might be a nice idea to contact Leevi about it and see if he has any ideas on that though. Failing that some of your template code might help 😉
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.