diff --git a/cache/index.json b/cache/index.json deleted file mode 100644 index bd33467..0000000 --- a/cache/index.json +++ /dev/null @@ -1 +0,0 @@ -{"http://localhost/typemill/welcome":{"title":"Welcome","content":" Great that you give Typemill a try!! Typemill is a small open source cms and a project in work. You will probably miss some important features, but we are working hard to add everything that is needed for a handy and productive writing-system. ","url":"http://localhost/typemill/welcome"},"http://localhost/typemill/welcome/setup":{"title":"Setup","content":" Congratulations! If you see this page, then the setup of the system has worked successfully!! You can now login (/tm/login) and configure your system, your themes and your plugins. You will find all settings in the settings-area (/tm/settings). ## If it does not work If you face any problems during the installation, then please make sure, that your system supports these features: - PHP version 7+. - Apache server. - The module `mod_rewrite` and `htaccess`. If you run a linux-system like Debian or Ubuntu, then please double check that `mod_rewrite` and `htaccess` are activated. Check this [issue on GitHub](https://github.com/typemill/typemill/issues/16) for help. Please make the following folders writable with permission 774 (you can use your ftp-software for it): - Cache - Content - Media - Settings If you still get an error, then you can post an issue on [GitHub](https://github.com/typemill/typemill). ","url":"http://localhost/typemill/welcome/setup"},"http://localhost/typemill/welcome/write-content":{"title":"Write Content","content":" Typemill is a simple Flat File Content Management System (CMS). We (the community) work hard to provide the best author experience with easy and intuitive authoring tools. But Typemill is still in early development and it is likely that not everything will work perfectly out of the box. If you miss something or if you have ideas for improvements, then post a new issue on [GitHub](https://github.com/typemill/typemill/issues). ## The Navigation You can create, structure and reorder all pages with the navigation on the left side. To structure your content, you can create new folders and files with the \"add item\" button. To reorder the pages, just drag an item and drop it wherever you want. Play around with it and you will notice, that it works pretty similar to the folder- and file-system of your laptop. And in fact, this is exactly what Typemill does in the background: It stores your content in files and folders on the server. However, there are some limitations when you try to reorder elements. For example, you cannot move a complete folder to another folder, because this would change all the urls of the pages inside that folder, which is a nightmare for readers and search engines. ## The Editor You can create and format your content with the Markdown syntax, that is similar to the markup syntax of Wikipedia. If you are not familiar with Markdown, then please read the short [Markdown-tutorial](https://typemill.net/) in the documentation of Typemill. You can learn Markdown in less than 10 minutes and there is no easier and faster way to format your webpage. You will love it! Typemill provides two edit modes: The **raw mode** and the **visual mode**. You can switch between the modes in the publish-bar at the bottom of each page. The **raw mode** is the most robust way to create your content, because you write raw markdown into a simple textarea. The **visual mode** uses blocks and transforms each content block into a html-preview immediately. This means that you can directly see and check the formatted result. By default Typemill will use the **visual mode**. * You can change the default mode in the system settings. * You can also switch each format button on and off in the system settings. ## The Publish Bar The publish bar of Typemill is pretty intuitiv and sticks at the bottom of the screen so that you have always full control of the status of each page. Simply play around with it and you will quickly understand how it works. In short: * The green button \"online\" indicates, that your page is published and visible for your readers. * You can depublish a page by clicking the green \"online\" button. The button will turn gray with the label \"offline\" and the page is not visible for your readers anymore. * With the green button \"Publish\" you can either publish a page that is offline or you can publish some unpublished changes on your page. * The publish-button is gray and disabled, if the page is online and if there are no unpublished changes. * All buttons will change in real time, so you can always exactly see what is going on. * To provide an easy status-overview of the whole website, Typemill marks all pages in the navigation on the left side as published (green), changed (orange) and unpublished (red). ## Working with Drafts Ever tried to revise a published article in WordPress? Yes, it works, but if you click on \"save\", then all your changes are directly live. Typemill is much more flexible here and allows you to keep your original version live while you work on a **drafted version** in the background. This is how Typemill handles it: * In **visual mode**: Typemill stores your changes in a new draft automatically as soon as you save any content-block. * In **raw mode**: To store changes in a new draft, simply click on the \"save draft\"-button in the publish controller. * You can work on a draft as long as you want without changing the live version. Your changes go live if you click the button \"publish\". * In visual mode, you can also use the discard-button and go back to the published version. ","url":"http://localhost/typemill/welcome/write-content"},"http://localhost/typemill/welcome/get-help":{"title":"Get Help","content":" If you need any help, then please read the [documentation on typemill.net](https://typemill.net/typemill) first. Some short video-tutorials are in work right now. If you found a bug or if you have a question, then please open a new issue on [GitHub](https://github.com/typemill/typemill/issues). Do you need professional help, an individual theme or a special plugin? You can hire us at [Trendschau Digital](https://trendschau.net/typemill-development). [Contributions](https://github.com/typemill/typemill#contributors--supporters), [donations](https://www.paypal.me/typemill) and [feedback](https://github.com/typemill/typemill/issues) for this open source project are always welcome. ","url":"http://localhost/typemill/welcome/get-help"},"http://localhost/typemill/welcome/markdown-test":{"title":"Markdown Reference and Test Page","content":" Markdown is a simple and universal syntax for text formatting. More and more writers switch to markdown, because they can format their text during the writing process without using any format-buttons. Once they are familiar with the markdown syntax, they can write formatted text much easier and faster than with any standard HTML-editor. Developers love markdown, because it is much cleaner and saver than HTML. And they can easily convert markdown to a lot of other document formats like HTML and others. If you develop a theme for TYPEMILL, please take care that all elements on this page are designed properly. ## Table of Contents To create a table of contents, simply write `[TOC]` in a separate line. It will be replaced with a table of contents like this automatically. [TOC] ## Headlines ``` Headlines are simply done with hash chars like this: # First Level Headline ## Second Level Headline ### Third Level Headline #### Fourth Level Headline ##### Fifth Level Headline ###### Sixth Level Headline ``` ### Third Level Headline A third headline is more decent and lower prioritized than a second level headline. #### Fourth Level Headline A fourth level headline is more decent and lower prioritized than a third level headline. ##### Fifth Level Headline A fifth level headline is more decent and lower prioritized than a fourth level headline. ##### Sixth Level Headline A sixth level headline is more decent and lower prioritized than a fifths level headline. ##Paragraph ```` A paragraph is a simple text-block separated with a new line above and below. ```` A paragraph is a simple text-block separated with a new line above and below. ## Soft Linebreak ```` For a soft linebreak (eg. for dialoges in literature), add two spaces at the end of a line and use a simple return. She said: \"Hello\" He said: \"again\" ```` For a soft linebreak (eg. for dialoges in literature), add two spaces at the end of a line and use a simple return. She said: \"Hello\" He said: \"again\" ##Emphasis ```` For italic text use one *asterix* or one _underscore_. For bold text use two **asterix** or two __underscores__. ```` For italic text use one *asterix* or one _underscore_. For bold text use two **asterix** or two __underscores__. ##Lists ```` For an unordered list use a dash - like - this Or use one asterix * like * this For an ordered list use whatever number you want and add a dot: 1. like 1. this ```` For an unordered list use a dash - like - this Or use one asterix * like * this For an ordered list use whatever number you want and add a dot: 1. like 2. this ## Horizontal Rule ``` Easily created for example with three dashes like this: --- ``` Easily created for example with three dashes like this: --- ##Links ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). You can link to anchors like this [anchor](#images) You can also add a [title](http://typemill.net \"typemill\"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. You can even use a download-link like []() ```` This is an ordinary [Link](http://typemill.net). Links can also be [relative](/info). You can link to anchors like this [anchor](#images) You can also add a [title](http://typemill.net \"typemill\"). You can even add [ids or classes](http://typemill.net){#myid .myclass}. Or you can use a shortcut like http://typemill.net. [markdown (PNG, 1.05 KB)](media/files/markdown.png){.tm-download file-png} ##Images ```` The same rules as with links, but with a ! ![alt-text](media/markdown.png) *With caption* ![alt-text](media/markdown.png \"my title\"){#myid .imgClass} *With caption that spans over several lines* ![alt-text](media/markdown.png \"my title\"){#myid .otherclass width=150px} ```` The same rules as with links, but with a ! ![alt](media/files/markdown.png){.center} *With Caption* ![alt](media/files/markdown.png \"title\"){.center} *With a caption that spans over several lines.* ![alt-text](media/files/markdown.png \"my title\"){#myid .otherclass width=150px} ## Linked Images ```` You can link an image with a nested syntax like this: [![alt-text](media/markdown.png)](https://typemill.net) ```` You can link an image with a nested syntax like this: [![alt-text](media/files/markdown.png){.imgClass}](https://typemill.net) ## Image Position ```` You can controll the image position with the classes .left, .right and .middle like this: ![alt-text](media/markdown.png){.left} *With caption that spans over several lines* ![alt-text](media/markdown.png){.right} *With caption that spans over several lines* ![alt-text](media/markdown.png){.center} *With caption that spans over several lines* ```` ![image float left](media/files/markdown.png){.left} *With caption that spans over several lines* The first image should float on the left side of this paragraph. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ![image float right](media/files/markdown.png){.right} *With caption that spans over several lines* The second image should float on the right side of this paragraph. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ![image center](media/files/markdown.png){.center} *With caption that spans over several lines* The thirds image should be placed above this paragraph and centered to the middle of the content area. This might not work with all themes. If you are a theme developer, please ensure that you support the image classes \"left\", \"right\" and \"center\". You can add these classes manually in the raw mode or you can assign them in the visual mode when you edit a picture (double click on it to open the dialog). Images in a separate line are rendered with the html5 elements `figure` and `figcapture`. ## Blockquote ``` There are always some women and men with wise words > But I usually don't read them, to be honest. ``` There always some women and men with wise words > But I usually don't read them, to be honest. ##Footnotes ```` You can write footnotes[^1] with markdown. Scroll down to the end of the page[^2] and look for the footnotes. Add the footnote text at the bottom of the page like this: [^1]: Thank you for scrolling. [^2]: This is the end of the page. ```` You can write footnotes[^1] with markdown. Scroll down to the end of the page[^2] and look for the footnotes. Footnotes won't work with the visual editor right now, so please use the raw mode for them. ## Abbreviations ```` *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ```` You won't see the abbreviation directly, but if you write HTML or W3C somewhere, then you can see the tooltip with the explanation. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ## Definition List ```` Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ```` Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus. ## Notices You can create different notices if you add a '!', '!!', '!!!', '!!!!' before a line. This will wrap the content into a div-class with the classes `notice1`, `notice2`, `notice3` and `notice4`. You can also span notices over several lines. This logic follows some other CMS like Grav, Lektor or Yellow and it is not compatible with other markdown processors or editors. ! Notice 1 ! ! Please note that you can use **markdown** inside of the notice so you can *format* your text here. !! Notice 2 !! !! Please note that you can use **markdown** inside of the notice so you can *format* your text here. !!! Notice 3 !!! !!! Please note that you can use **markdown** inside of the notice so you can *format* your text here. ## Tables ```` |name |usage | |-----------|-----------| | My Name | For Me | | Your Name | For You | ```` | Name | Usage | | --------- | ------- | | My Name | For Me | | Your Name | For You | ## Code ```` Let us create some `` like this ```` Let us create some `` and now let us check, if a codeblock works: ```` Use four apostroph like this: \\```` \\```` ```` ## Math Please activate the math-plugin to use mathematical expressions with LaTeX syntax. You can choose between MathJax or the newer KaTeX library. MathJax is included from a CDN, KaTeX is included in the plugin. So if you don't want to fetch code from a CDN, use KaTeX instead. The markdown syntax in TYPEMILL is the same for both libraries. ```` Write inline math with \\(...\\) or $...$ syntax. inline $x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)$ math inline \\(x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)\\) math ```` inline $x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)$ math inline \\(x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a)\\) math ```` Write display math with $$...$$ or \\[...\\] syntax. $$ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) $$ \\[ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) \\] ```` $$ x = \\int_{0^1}^1(-b \\pm \\sqrt{b^2-4ac})/(2a) $$ [^1]: Thank you for scrolling. [^2]: This is the end of the page. ","url":"http://localhost/typemill/welcome/markdown-test"},"http://localhost/typemill/cyanine-theme":{"title":"The Cyanine Theme","content":" Cyanine is the modern, lightweight and flexible standard theme for Typemill. You can activate a landingpage, setup different content sections for the landingpage and order them like you want. You can also change the colors, fonts and other details. To configure the theme, login to the system (/tm/login), go to the theme settings (/tm/themes) and choose the theme \"Cyanine\". If Cyanine does not fit to your needs, then you can also choose another theme in the [theme store](https://themes.typemill.net) of Typemill. ","url":"http://localhost/typemill/cyanine-theme"},"http://localhost/typemill/cyanine-theme/landingpage":{"title":"The Landingpage","content":" Cyanine provides an optional landingpage with six segments: * **Intro** with the content of the home page and an additional link/button. * **Info** with individual markdown content. * **Teaser** with two elements. Each element has a headline, a text and a link/button. * **Contrast** with a headline, text-input and a link/button. The colors are inverted. * **Navigation** with the whole content of the website. You can change the depth of the navigation. * **News** with a link to a news-folder. It will display the three latest news in a card-design. Add a hero-image to each news-entry to show a teaser image. You can activate or deactivate the whole landingpage, order all elements and enable/disable each element individually. ","url":"http://localhost/typemill/cyanine-theme/landingpage"},"http://localhost/typemill/cyanine-theme/colors-and-fonts":{"title":"Colors and Fonts","content":" First of all cyanine supports individual logos. If you want to use our logo, then please upload it in the system settings. Cyanine will automatically replace the title text with your logo. You can also upload your own favicon in the system settings. Cyanine allows you to change many colors. Please make sure that your color-combinations are readable and accessible. The following colors are editable: * **Primary Theme Color**: used for the body background and borders. * **Secondary Theme Color**: used for content background, font-colors on hover and more. * **Primary Font Color**: used for main text. * **Secondary Font Color**: used as contrast color for hovers in navigation and buttons. * **Link Color**: used for text-links. Keep accessibility in mind. * **Thin Border Color**: used for thin borders in navigations and tables. You can also change the font-family for * headlines * text * buttons and navigations Cyanine uses wide spread system fonts with fallbacks: * serif * sans-serif * courier * helvetica * avenir * athelas * georgia * times * bodoni * calisto * garamond * baskerville If the color- and font-settings are not enough for your purpose, then you can always overwrite the theme-css with your own styles in the theme settings. ","url":"http://localhost/typemill/cyanine-theme/colors-and-fonts"},"http://localhost/typemill/cyanine-theme/footer":{"title":"3-Column Footer","content":" Cyanine provides a three column footer at the bottom of each page. You can use markdown for each column. Make sure that you use the correct headline-level (we suggest a headline level 3 or level 4 to keep the logical headline hierarchy in the document). You can, of course, also add link-lists or other elements. Check the website of [Typemill](https://typemill.net) for an example. ","url":"http://localhost/typemill/cyanine-theme/footer"},"http://localhost/typemill/cyanine-theme/content-elements":{"title":"Content Elements","content":" Cyanine provides a lot of other settings for your content area. For example: * Add an edit-button for github, gitlab or other plattforms. * Show the author. * Show the publish date. * Show the chapter numbers in the navigation. The Cyanine theme supports all content elements like tables, images, notices or downloads. It also supports anchor-links next to headlines, so you can deep link to certain content sections of your page. You can activate the anchors in the system settings of Typemill. ","url":"http://localhost/typemill/cyanine-theme/content-elements"}} \ No newline at end of file diff --git a/content/00-welcome/03-get-help.yaml b/content/00-welcome/03-get-help.yaml index ae23d91..0b0ea3c 100644 --- a/content/00-welcome/03-get-help.yaml +++ b/content/00-welcome/03-get-help.yaml @@ -6,14 +6,13 @@ meta: owner: null author: 'Sebastian Schürmanns' manualdate: null - modified: '2020-11-19' + modified: '2021-06-13' created: null time: null navtitle: '' - hide: false - mycustom: - product: car - price: '123,20' + hide: true + allowedrole: null + alloweduser: null seo: heroimage: media/live/bildschirmfoto-zu-2019-08-30-20-46-29.png heroimagealt: Alt-Text diff --git a/system/Controllers/PageController.php b/system/Controllers/PageController.php index c906279..83f6e32 100644 --- a/system/Controllers/PageController.php +++ b/system/Controllers/PageController.php @@ -377,7 +377,7 @@ class PageController extends Controller $extended = $yaml->getYaml('cache', 'structure-extended.yaml'); # create an array of object with the whole content of the folder - # $structure = Folder::getFolderContentDetails($pagetree, $extended, $uri->getBaseUrl(), $uri->getBasePath()); + $structure = Folder::getFolderContentDetails($pagetree, $extended, $uri->getBaseUrl(), $uri->getBasePath()); # now update the extended structure if(!$extended) @@ -389,16 +389,13 @@ class PageController extends Controller $yaml->updateYaml('cache', 'structure-extended.yaml', $extended); # we have to update the structure with extended again - # $structure = Folder::getFolderContentDetails($pagetree, $extended, $uri->getBaseUrl(), $uri->getBasePath()); + $structure = Folder::getFolderContentDetails($pagetree, $extended, $uri->getBaseUrl(), $uri->getBasePath()); } else { $extended = false; } } - - # create an array of object with the whole content of the folder - $structure = Folder::getFolderContentDetails($pagetree, $extended, $uri->getBaseUrl(), $uri->getBasePath()); # cache structure $cache->updateCache('cache', 'structure.txt', 'lastCache.txt', $structure); diff --git a/system/Models/Folder.php b/system/Models/Folder.php index bed4c25..1c001c2 100644 --- a/system/Models/Folder.php +++ b/system/Models/Folder.php @@ -337,6 +337,12 @@ class Folder public static function getPagingForItem($content, $item) { + # if page is home + if(trim($item->pathWithoutType, "/") == 'index') + { + return $item; + } + $keyPos = count($item->keyPathArray)-1; $thisChapArray = $item->keyPathArray; $nextItemArray = $item->keyPathArray;