#1 2016-02-24 20:16:34

Amadego
Member
Registered: 2015-05-19
Posts: 27

HTML inside tag prefix/suffix

Hi all,
I need to know if it's possible to pass html to the suffix/prefix attribute of a tag, and maybe with its css class.
Thanks to all
Amadego

Offline

#2 2016-03-07 16:14:09

otemu
Member
Registered: 2014-03-07
Posts: 183

Re: HTML inside tag prefix/suffix

Hi,

No this is not possible however you can just use the tag and class attribute
tag : Wraps the data inside the given tag
class : Add to the wrapping tag the given class

example:

<ion:article:title tag="h2" class="someclass"/>

will render:

<h2 class="someclass">some rendered title</h2>

Hope that helps

Last edited by otemu (2016-03-07 16:14:53)

Offline

#3 2016-03-11 17:33:29

Amadego
Member
Registered: 2015-05-19
Posts: 27

Re: HTML inside tag prefix/suffix

Hi otemu,
thanks for your reply, but, unfortunately, does not solve my problem.
What I'd like to have is a link (entered by the user in the backend, whose length is not known) and as soon as its content ends an icon.
Now in my page I have something like this

<i class="fa fa-chevron-right"></i><ion:content />

I was wondering about something like

<ion:content  prefix="i" class="fa fa-chevron-right" />.

I tried this solution, but obviously it didn't work tongue
Thank you anyway
Bye
Amadego

Offline

#4 2016-03-11 19:39:46

otemu
Member
Registered: 2014-03-07
Posts: 183

Re: HTML inside tag prefix/suffix

If your familiar with JQuery you could use prepend http://api.jquery.com/prepend/

Offline

#5 2016-03-17 13:13:09

Amadego
Member
Registered: 2015-05-19
Posts: 27

Re: HTML inside tag prefix/suffix

Thanks Otemu. I'm familiar with Jquery, but I think I'll use the structure I currently have, without usage of Jquery. I'll make some test and let you know. Bye

Offline

#6 2016-03-23 17:16:21

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: HTML inside tag prefix/suffix

Hello,

You want something like this?

Code in view file:

<ion:content tag="div" prepend="i" prepend_class="fa fa-chevron-right" />

Code in rendered:

<div><i class="fa fa-chevron-right"></i> Lorem Ipsun dolor sit amet... </div>

I dont think a "prefix" and "sulfix" would be usefull because you can always add it in the view file with native html code, but some prepend and append maybe can be usefull if the whole tag can be empty (and then the whole tag does not have output).

Best Regards,
Adamos42


Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations