NAVIGATION
This shows you the differences between two versions of the page.
|
english:technics:system-variables [2010/09/26 08:12] Knut Heermann (flip-flop) |
english:technics:system-variables [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 13: | Line 13: | ||
| 2 = e.g. if 1 then print | 2 = e.g. if 1 then print | ||
| 3 = if 1 then show category | 3 = if 1 then show category | ||
| - | 4 = if a link to a article then show (1) | + | 4 = if a link to an article then show (1) |
| 5 = free use | 5 = free use | ||
| </file> | </file> | ||
| Line 25: | Line 25: | ||
| $aktion[2] = isset($aktion[2]) ? intval($aktion[2]) : 0; // e.g. if 1 then print | $aktion[2] = isset($aktion[2]) ? intval($aktion[2]) : 0; // e.g. if 1 then print | ||
| $aktion[3] = isset($aktion[3]) ? intval($aktion[3]) : 1; // if 1 then show cat | $aktion[3] = isset($aktion[3]) ? intval($aktion[3]) : 1; // if 1 then show cat | ||
| - | $aktion[4] = isset($aktion[4]) ? intval($aktion[4]) : 0; // if a link to a article then show (1) | + | $aktion[4] = isset($aktion[4]) ? intval($aktion[4]) : 0; // if a link to an article then show (1) |
| $aktion[5] = isset($aktion[5]) ? intval($aktion[5]) : 0; // free use | $aktion[5] = isset($aktion[5]) ? intval($aktion[5]) : 0; // free use | ||
| </code> | </code> | ||
| Line 110: | Line 110: | ||
| // top article count for article list mode in site structure -> category -> top article count: | // top article count for article list mode in site structure -> category -> top article count: | ||
| dumpVar($GLOBALS['content']['struct'][$content['cat_id']]['acat_topcount']; // (count) | dumpVar($GLOBALS['content']['struct'][$content['cat_id']]['acat_topcount']; // (count) | ||
| + | |||
| + | // Article title of the current article (detail mode) | ||
| + | dumpVar($GLOBALS['content']['article_title']); | ||
| + | |||
| + | // Article subtitle of the current article (detail mode) | ||
| + | dumpVar($GLOBALS['content']['articles'][$GLOBALS['content']['article_id']]['article_subtitle']); | ||
| [/PHP] | [/PHP] | ||
| Line 125: | Line 131: | ||
| - | The variable ##$content['all_keywords']## //(or ##$GLOBALS['content']['all_keywords']## if in functions used)// supplies the Keywords of the current article. | + | The variable ##$content['all_keywords']## //(or ##$GLOBALS['content']['all_keywords']## if used in functions )// supplies the Keywords of the current article. |
| - | E.g.: //Forum [[http://forum.phpwcms.org/viewtopic.php?p=120863#p120863|Css eines Artikels ändern]]// [DE] | + | **E.g.:** Write the keywords into an array: |
| - | A special CSS formatting for an article: | + | <code php> |
| + | $keywords_array = convertStringToArray($GLOBALS['content']['all_keywords']); | ||
| + | </code> | ||
| - | **Question:** \\ | + | \\ |
| - | //"If I liked to indicate a special css for only one article , where I make that? | + | |
| - | For explanation, I would like to have individual articles with a dark instead of a bright side background." // | ||
| - | **Answer:** \\ | ||
| - | //"I would work with a special keyword by using a frontend_render script to react accordingly. | ||
| - | Set the keyword "*CSS-dark*" with the article into the appropriate field. When rendering is checked out the <body> tag is enhanced by the corresponding class. This can normally be defined via CSS."// | + | **E.g.:** //Forum [[http://forum.phpwcms.org/viewtopic.php?p=120863#p120863|Css eines Artikels ändern]]// [DE] |
| + | |||
| + | A special CSS formatting for an article: | ||
| + | |||
| + | > **Question:** \\ | ||
| + | > //"If I liked to indicate a special css for only one article , where will I do that? | ||
| + | > | ||
| + | > For explanation, I would like to have individual articles with a dark instead of a bright page background." // | ||
| + | |||
| + | > **Answer:** \\ | ||
| + | > //"I would work with a special keyword by using a frontend_render script to trigger it accordingly. | ||
| + | |||
| + | Set the keyword "*CSS-dark*" into the appropriate fiel dof the article. When rendering is checked out the <body> tag is enhanced by the corresponding class. This normally can be defined via CSS."// | ||
| Line 161: | Line 177: | ||
| </code> | </code> | ||
| - | **Attention** - the class(es) "dark level-" was selected consciously in such a way, since still additionally the level ID is given. | + | **Attention** - the class(es) "dark level-" were selected intentionally in such a way, since still additionally the level ID is given. |
| ~~UP~~ | ~~UP~~ | ||
| Line 173: | Line 189: | ||
| - | Now it is possible to selecte the current category ID related to the level. | + | Now it is possible to select the current category ID related to the level. |
| <code html|h test snippet Level-Ids |h> | <code html|h test snippet Level-Ids |h> | ||
| Line 261: | Line 277: | ||
| ===== GET variable set and read ===== | ===== GET variable set and read ===== | ||
| - | Example: The variable is called "cpimage" and contains an integer value. | + | Example: The variable is called "cpimage" and is containing an integer value. |
| === Preparing the address: === | === Preparing the address: === | ||
| Line 296: | Line 312: | ||
| </code> | </code> | ||
| - | The integer value in **$cpImgNr** can now be processed, but should be checked prior to "false". | + | The integer value in **$cpImgNr** can be processed now, but should be checked prior to "false". |
| \\ | \\ | ||
| Line 306: | Line 322: | ||
| </code> | </code> | ||
| + | \\ | ||
| ~~UP~~ | ~~UP~~ | ||
| + | |||
| + | |||
| + | ===== CP News in Detail View ===== | ||
| + | |||
| + | |||
| + | |||
| + | Check if a news CP is in the detail view: | ||
| + | |||
| + | <code PHP> | ||
| + | if(isset($_getVar['newsdetail'])) { ..... | ||
| + | </code> | ||
| + | |||
| + | |||
| + | \\ | ||
| + | ~~UP~~ | ||