cheatsheet
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| cheatsheet [2023/08/24 20:16] – [Themes and Style Sheets] 67.186.161.147 | cheatsheet [2023/08/29 13:16] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 572: | Line 572: | ||
| SelectAttributeTypeOption:: | SelectAttributeTypeOption:: | ||
| } | } | ||
| - | ?> | ||
| - | </ | ||
| - | |||
| - | ===== Select Nav Based On Page Attributes ===== | ||
| - | <code php> | ||
| - | (See language Switching) | ||
| - | |||
| - | <?php | ||
| - | if ($c-> | ||
| - | $block = Block:: | ||
| - | if( is_object($block) ) $block-> | ||
| - | } else { | ||
| - | $block = Block:: | ||
| - | if( is_object($block) ) $block-> | ||
| - | } | ||
| ?> | ?> | ||
| </ | </ | ||
| Line 1058: | Line 1043: | ||
| usort($pages, | usort($pages, | ||
| ?> | ?> | ||
| + | </ | ||
| + | |||
| + | ====== Working With Languages ====== | ||
| + | ===== Get Active Language ===== | ||
| + | <code php> | ||
| + | $lang = \Localization:: | ||
| + | </ | ||
| + | |||
| + | ===== Get Default Language ===== | ||
| + | <code php> | ||
| + | $app = \Concrete\Core\Support\Facade\Application:: | ||
| + | $site = $app-> | ||
| + | $defaultLang = $site-> | ||
| </ | </ | ||
cheatsheet.txt · Last modified: 2023/08/29 13:16 by 127.0.0.1