Forums / Developer / Issue on Custom tag

Issue on Custom tag

Author Message

Vins Prasad

Wednesday 24 March 2010 5:36:19 am

Hi All,

I have created a custom tag for my own design, something like "factbox". I have issues when I try to add my custom tag to a page in the Edit mode.
Issues
1. If my Custom tag add to the page, its only boxed (aqua color) around the default text, not like adding "factbox" tag.
2. If I paste some text from out, It'll break the tag box
3. If press "Enter" key, again its break tag output to two separate outputs

Could anyone can help me to solve this issue?

Thanks in advance,

Vins

Lukasz Klejnberg

Wednesday 24 March 2010 3:03:17 pm

Hi,

Are you can put somewhere your new custom tag so that I could download it and see what is wrong.

Best regards,
Lukasz

Vins Prasad

Wednesday 24 March 2010 10:01:52 pm

Hi,

Thank you for your reply. I am a newbie and still I am lost with most of my ezpublish developments. So please let me know if I have done any mistakes on my developments or any suggestions. As you requested, I have uploaded .tpl file along with some other information to the rapidshare site. It's just a small file 80KB. I am really appreciate your help.

Link
http://rapidshare.com/files/367844827/ToSend.zip.html

Thanks,
Vins

Lukasz Klejnberg

Thursday 25 March 2010 1:13:34 am

Hi,

Change your line (content.ini.append.php):

IsInline[mycustomtag2]=true

to

IsInline[mycustomtag2]=false

and i think it will be well

Best regards,
Lukasz

Vins Prasad

Thursday 25 March 2010 3:42:20 am

Hi,

Thank you for your reply. you are correct. Its work perfectly after the change. thank you again.

Sorry for asking another help from you, if you can please have a look on below issue which I have entered. There I try to use same custom tag with a template.

http://share.ez.no/forums/developer/how-to-create-sub-items-object-and-show-it-directly-in-pages

Thank you again for your quick response and help.

Regards,
Vins

Vins Prasad

Thursday 25 March 2010 3:54:02 am

Hi Others,

Since rapidshare link will be expired in later time, here I added the code of my custom tag and ini file entries so anyone new to ezpublish might can get a help.

--------- START - code of "mycustomtag2.tpl" ----------

<div>
<table cellpadding="5" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-weight: bold; font-size: 11px; background-image: url(/ezpublish2/extension/ezwebin/design/ezwebin/images/topimg.jpg); width: 100%; color: #ffffff; background-repeat: repeat-x; font-family: verdana, arial, helvetica, sans-serif; text-align: left">
{if and(is_set( $linktext ), $linktext )}{$linktext}{/if}
</td>
</tr>
<tr>
<td style="font-weight: bold; font-size: 10px; background-image: url(/ezpublish2/extension/ezwebin/design/ezwebin/images/contents_backgrnd.jpg); color: #ffffff; background-repeat: repeat-y; font-family: verdana, arial, helvetica, sans-serif; text-align: left">
{$content}
</td>
</tr>
</tbody>
</table>
<br>
</div>

--------- END - code of "mycustomtag2.tpl" ----------

--------- START - ini file settings ----------

------------------------ content.ini.append.php -------------------------------------

ini file
C:\inetpub\wwwroot\ezpublish2\settings\siteaccess\ezwebin_site_admin\content.ini.append.php
[CustomTagSettings]
AvailableCustomTags[]=mycustomtag2
IsInline[mycustomtag2]=false
[mycustomtag2]
# Custom attributes list
CustomAttributes[]
CustomAttributes[]=linktext
CustomAttributes[]=marginright
CustomAttributes[]=marginleft
---------------------------- mycustomtag2.tpl ----------------------------------

tpl file location
C:\inetpub\wwwroot\ezpublish2\design\standard\templates\content\datatype\view\ezxmltags\mycustomtag2.tpl

--------- END - ini file settings ----------

regards,

Vins