From 875d5a1ca843b8169f0b4e8adf8d6f0eb7b4ee3c Mon Sep 17 00:00:00 2001 From: Adrian Voicu Date: Thu, 12 Mar 2015 16:42:50 +0200 Subject: additional info on heading() function ...worth mentioning... --- user_guide_src/source/helpers/html_helper.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index d35be396a..1989c88ae 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -27,11 +27,11 @@ The following functions are available: .. php:function:: heading([$data = ''[, $h = '1'[, $attributes = '']]]) - :param string $data: Content - :param string $h: Heading level - :param array $attributes: HTML attributes - :returns: HTML heading tag - :rtype: string + :param string $data: Content + :param string $h: Heading level + :param array|string $attributes: HTML attributes + :returns: HTML heading tag + :rtype: string Lets you create HTML heading tags. The first parameter will contain the data, the second the size of the heading. Example:: @@ -41,15 +41,18 @@ The following functions are available: The above would produce:

Welcome!

Additionally, in order to add attributes to the heading tag such as HTML - classes, ids or inline styles, a third parameter is available:: + classes, ids or inline styles, a third parameter is available either + as a string or as an array:: - echo heading('Welcome!', 3, 'class="pink"') + echo heading('Welcome!', 3, 'class="pink"'); + echo heading('How are you?', 4, array('id'=>'question', 'class'=>'green'); The above code produces: .. code-block:: html

Welcome!

+

How are you?

.. php:function:: img([$src = ''[, $index_page = FALSE[, $attributes = '']]]) @@ -401,4 +404,4 @@ The following functions are available:     .. note:: This function is DEPRECATED. Use the native ``str_repeat()`` - in combination with `` `` instead. \ No newline at end of file + in combination with `` `` instead. -- cgit v1.2.3-24-g4f1b From 8e2f83d7b775d87827a58fbb55a35938eeb66173 Mon Sep 17 00:00:00 2001 From: Adrian Voicu Date: Thu, 12 Mar 2015 17:13:47 +0200 Subject: Update html_helper.rst --- user_guide_src/source/helpers/html_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 1989c88ae..d5069cec4 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -52,7 +52,7 @@ The following functions are available: .. code-block:: html

Welcome!

-

How are you?

+

How are you?

.. php:function:: img([$src = ''[, $index_page = FALSE[, $attributes = '']]]) -- cgit v1.2.3-24-g4f1b From 0cfe1c3f389ff11a65cf014ea41672834d8719ac Mon Sep 17 00:00:00 2001 From: Adrian Voicu Date: Thu, 12 Mar 2015 22:11:06 +0200 Subject: Update html_helper.rst --- user_guide_src/source/helpers/html_helper.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index d5069cec4..955ffefc5 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -27,11 +27,11 @@ The following functions are available: .. php:function:: heading([$data = ''[, $h = '1'[, $attributes = '']]]) - :param string $data: Content - :param string $h: Heading level - :param array|string $attributes: HTML attributes - :returns: HTML heading tag - :rtype: string + :param string $data: Content + :param string $h: Heading level + :param mixed $attributes: HTML attributes + :returns: HTML heading tag + :rtype: string Lets you create HTML heading tags. The first parameter will contain the data, the second the size of the heading. Example:: @@ -45,7 +45,7 @@ The following functions are available: as a string or as an array:: echo heading('Welcome!', 3, 'class="pink"'); - echo heading('How are you?', 4, array('id'=>'question', 'class'=>'green'); + echo heading('How are you?', 4, array('id' => 'question', 'class' => 'green')); The above code produces: -- cgit v1.2.3-24-g4f1b From f67b6fd02fb3a683fa93ad59d8587beda3c9bb6a Mon Sep 17 00:00:00 2001 From: Adrian Voicu Date: Thu, 12 Mar 2015 22:13:08 +0200 Subject: Update html_helper.rst --- user_guide_src/source/helpers/html_helper.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/html_helper.rst b/user_guide_src/source/helpers/html_helper.rst index 955ffefc5..88611011c 100644 --- a/user_guide_src/source/helpers/html_helper.rst +++ b/user_guide_src/source/helpers/html_helper.rst @@ -31,7 +31,7 @@ The following functions are available: :param string $h: Heading level :param mixed $attributes: HTML attributes :returns: HTML heading tag - :rtype: string + :rtype: string Lets you create HTML heading tags. The first parameter will contain the data, the second the size of the heading. Example:: @@ -41,8 +41,8 @@ The following functions are available: The above would produce:

Welcome!

Additionally, in order to add attributes to the heading tag such as HTML - classes, ids or inline styles, a third parameter is available either - as a string or as an array:: + classes, ids or inline styles, a third parameter accepts either a string + or an array:: echo heading('Welcome!', 3, 'class="pink"'); echo heading('How are you?', 4, array('id' => 'question', 'class' => 'green')); -- cgit v1.2.3-24-g4f1b