1 (edited by 2015-03-07 19:35:57)

Topic: HTML scripts

Hello supportTeam,

what can i do with: Dashboard -> HTML scripts


greetings john

Re: HTML scripts

Dashboard -> HTML scripts allow you to implement your own javascript or html in the page code to display news, e.g. when you use some functions from javascript library in the news templates.

Best regards,
CN Support team

3 (edited by 2015-03-10 13:45:53)

Re: HTML scripts

Dashboard -> HTML scripts allow you to implement your own javascript or html in the page code to display news, e.g. when you use some functions from javascript library in the news templates.


How include the HTML-Scripts in my template, with a keyword?

_edit:_

the "html" script named my script: myCode

<?php
echo 'hello';
?>

in "index.php" I added
include("cutenews/snippet.php");

and into my template:

 $snippet = 'myCode'


Greetings

Re: HTML scripts

How include the HTML-Scripts in my template, with a keyword?

_edit:_

the "html" script named my script: myCode

<?php
echo 'hello';
?>

in "index.php" I added
include("cutenews/snippet.php");

and into my template:

 $snippet = 'myCode'


Greetings


Hello Support Team,

do you can post an example how to use the 'html script'.

Thanks.

Greetings

Re: HTML scripts

a. The initial purpose of snippets was to give users a possibility to change the content of web pages without using FTP. E.g. let's create a text snippet sandbox:

<?php
   require_once 'cn_api.php';
   $snippet = 'sandbox';
   include 'snippet.php';

On page test.php, for example.

Now, all the changes made by the admin to the data in snippets will will also be made to the contents of the test.php page.

b. If you write a structure in the form of [news|number=5] in the snippet, this will be equivalent to the inclusion of:

  <?php $number = 5; include "show_news.php"; ?> вместо [news|number=5].

Parameters can also be supplemented with, for example, [news | number = 5 | category = 1], and others.

Best regards,
CN Support team