Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hello folks,

i searched the forums, if there is already a post belonging to my issue, but i couldnt find any.

Is there a documentation for writing addons / custom tags? I created a shortcode to render markdown at server side. It can be used like this:
Code: Select all
<cms:do_shortcodes>
  [markdown]
    <cms:show a_textarea />
  [/markdown]
</cms:do_shortcodes>

What i want to achieve is using it like this:
Code: Select all
<cms:markdown a_textarea />

Could anybody give me advice, how to do this?

Thanks in advance,
jwolff
@jwolff, did you write that tag? If not, you may consider a cms:func replacement -
Code: Select all
<cms:func 'markdown' field=''><cms:ignore>
   
    // Does something
    // Sample: <cms:call 'markdown' field='a_textarea' />
   
    </cms:ignore>
    <cms:if "<cms:not_empty field />">
        <cms:do_shortcodes>
          [markdown]
            <cms:get field />
          [/markdown]
        </cms:do_shortcodes>
    </cms:if>
</cms:func>

It is not maybe as laconic as a native tag, but does the job and is much easier :)
Please let me know what you think.
Say `Please!` [̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]..... Active topics [Forum posts from previous 7 days].... helpcouch@mail.ru [My email for friends]
2 posts Page 1 of 1

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 4 guests