Welcome Guest, Not a member yet? Register   Sign In
xhtml-ending Tag in Helpers
#1

Hello,
is there a possibility to insert helper-tags without the xhtml ending-tag "/>"?
Like a switch to toggle this behaviour?

Best regards.
Reply
#2

Hmmm - I am not aware of such a tag in any of the CI helpers.
Can you give an example of one of these?
Reply
#3

For example in the file "html_helper.php" the "meta"-function returns the meta-tag with "/>".
Also the returned fields in "form_helper.php".
Reply
#4

Now your reference makes sense Smile No, there is no way to toggle that in stock CI.

You could over-ride the functionality by creating application/helpers/MY_html_helper and MY_form_helper, and providing replacement functions for the ones you want to behave differently. See http://www.codeigniter.com/user_guide/ge...ng-helpers
Reply
#5

@basenic

Why?
Reply
#6

(06-09-2016, 01:21 AM)basenic Wrote: Hello,
is there a possibility to insert helper-tags without the xhtml ending-tag "/>"?
Like a switch to toggle this behaviour?

Best regards.

Why would you even want to do this? In HTML you should close empty tags as well.
Get into the habit of writing well formed code. It will help you a lot in the long run.
On the package it said needs Windows 7 or better. So I installed Linux.
Reply
#7

In html 5 they removed the ending tag /> to just > it does not matter either way it will still work.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

Oh...thats a bummer. As InsiteFX already wrote, we are only coding in HTML5 anymore. There are no closing slash-tag. Same for HTML4 (not xhtml).

Does anybody know if such an option is considered for CI4?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB