Many newlines

Author Message

Kaiko Kaur

Wednesday 23 April 2003 6:09:25 am

Hi

I'd like to make more space to my article, but I can't use many enter characters, because it will be converted to one paragraph again.
It seem quite strange to make new class for this!
I'm happy if I know answer and I'm more happy if I know what is goal of deleting things (many newlines, unknown tags) from articles.

Thanks

Tony Wood

Wednesday 23 April 2003 6:17:02 am

Try these tags http://ez.no/manual/user/everyday#Tags. If these do not have what you need then implement a custom tag such as <mynewline>

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Wednesday 23 April 2003 6:26:56 am

sorry if I should find this by myself, but where is described how to make new tag like <mynewline>?

Tony Wood

Wednesday 23 April 2003 7:58:39 am

My Apologies, I did not explain.

Ok to make a newline custom tag you.

1. Add you file that is the same name as your tag to design/user/templates/content/datatype/view/ezxmltags
in this case lets call it mynewlline.tpl.

Note 1. If the directory structure does not exist create it.
Note 2. This assumes you have you design data under 'user' and not another name. Of course you can change this.

2. Edit mynewline.tpl and place your HTML in it.. i.e.
<div style="clear: both;"></div>

3. Add custom tag to content.ini file so it is available to the online editor, if you areu using it.

[CustomTagSettings]
AvailableCustomTags[]=mynewline

Thats it... you can use the <mynewline> tag in you XML text fields.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Monday 12 May 2003 9:46:25 pm

Hi,
quite old question. I've been hurry and I used other solutions for this; reason is: this is still not working. I'm very sure I do everything exactly as it is described here, but if I use this <mynewline> tag, then this will disappear without any message.
I'm also very sure about caches - there is no cache.
Any ideas? What should I check? What to change? Why is there not some message like 'eZ publish don't like this tag!'? :)

thank you (again)

Bård Farstad

Tuesday 13 May 2003 12:25:37 am

You need to enter a valid XML tag so <mynewline/> or <mynewline></mynewline> should solve your problem. If not eZ publish will not validate the input.

-bård

Documentation: http://ez.no/doc

Tony Wood

Tuesday 13 May 2003 12:45:39 am

This information is also in an contributed article.
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/howtos/how_do_i_create_a_custom_tag

Please update with any notes that will help other people if it was unclear to you, once you resolve your problem.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Tuesday 13 May 2003 5:07:59 am

I have seen this howto, but it don't work for me.
See:
myhost:/usr/local/apache/htdocs # cat design/mydesign/templates/content/datatype/view/ezxmltags/mynewline.tpl
<br />
<br />
myhost:/usr/local/apache/htdocs # ls -l design/mydesign/templates/content/datatype/view/ezxmltags/mynewline.tpl
-rw-r--r-- 1 me users 14 May 13 17:58 design/mydesign/templates/content/datatype/view/ezxmltags/mynewline.tpl
mh:/usr/local/apache/htdocs # grep mynewline settings/content.ini
AvailableCustomTags[]=mynewline

There is also already defined tag: strike. This doesn't work also. If I write: "<strike>test</strike>" it will turn just "test".

Have you more ideas?

Tony Wood

Tuesday 13 May 2003 6:30:28 am

Looks like its all there... I would try the following.

Addd the word test to the mynewlin.tpl so you can test without viewing source... Its a bit quicker and it my be working but you are not seeing it.

Long shot: Try making the content.ini a content.ini.php with the change...

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Wednesday 14 May 2003 3:41:27 am

> Addd the word test to the mynewlin.tpl so you can test without viewing source... Its a bit quicker and it my be working but you are not seeing it.

Problem is not there do I see that or I do not! After editing article this tag will be removed from text. If I put this '<mynewline/>' to article text, send it for publish and after that will repeat editing I can see my '<mynewline/>' nowhere. Other changes are implemented. Seems like this tag is not allowed.

> Long shot: Try making the content.ini a content.ini.php with the change...

Didn't help!

Tony Wood

Wednesday 14 May 2003 3:45:13 am

try using

<mynewline> </mynewline>

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Wednesday 14 May 2003 3:47:07 am

I've tryed:
<mynewline></mynewline>
<mynewline>
<mynewline/>
<mynewline />

I also want to renotice: Also <strike>something</strike> don't work. This is configured by default, not by myself.

Tony Wood

Wednesday 14 May 2003 4:38:58 am

Sorry its my fault i forgot the usage...

It should be
<custom name='strike'>
my strike
</custom>
or
<custom name='mynewline'></custom>

I have updated doco with usage too...

http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/howtos/how_do_i_create_a_custom_tag

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Wednesday 14 May 2003 5:33:24 am

ok, much better :)
Btw, after I tryed <custom name="mynewline"/> it removed content following that. It is not nice even if it not bug.
If so, it seem that is no way to make short tags like <br />?!
Most sense have cust tag which don't change content. Like this:
<custom name="html"><br /></custom>.
Then I can create exactly what html i do want to!

Thank you anyway!

Tony Wood

Wednesday 14 May 2003 5:43:09 am

You can make short custom tags just don;t leave anything in the middle of the tag.

<custom name="mynewline"></custom>

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kaiko Kaur

Wednesday 14 May 2003 6:14:40 am

It is not really very short for new line. If there is really some bigger thing, then it is ok.
I also noticed that I can't use newline as
<custom name="html"><br /></custom>
because this <br /> will be deleted as before :)
Sometimes there is need for plain html (maybe for javascript or css) and if this is only once needed, it seems to be quite stupid to make template for that. So, my solution is new datatype, what will output textbox content without change.
This way I can include needed html like <object id="node_id" />, but it would be nice if I can write id as some text not like number. It is for humans. Is this possible?
Shortly: can I name some object this way it have name, not id?
This way I could use newline like <object id="br"/> or <object id="some_javascript"/>. It is more easy to remember than <object id="234"/>...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.