I would consider myself a fairly proficient coder, and recently, due to the volume of sites I now have to take care of needed a better solution than manual coded updates, cue modx.
I have succesfully installed and have the default template working. What i need to achieve is be able to bolt CMS or WYSIWYG sections into particular pages, or create new pages that rely on user submitted content which have the same CSS etc as the main site. Now, am i being a complete retard but I just dont understand, looked at the documentation and (maybe I have missed it) it mentions nothing about for example "insert your own css", "step 1 do this,step 2 do this"
I will eventually integrate comment / blog / gallery / calender plugins etc but, lol I just need to know how the hell I start the process off.
-
☆ A M B ☆
- 24,524 Posts
The css is specified in the template, which is a skeleton HTML document with bog-standard HTML tags like <head> and <link rel="stylesheet...>.
http://www.sottwell.com/how-templates-work.html
It’s actually too simple; a lot of first-time users are confused because they expect something much more difficult!
Sottwell’s template page is an excellent place to begin. You can also look at the site in my sig for a general overview of MODx and advice on porting existing sites to MODx.
BTW, shouldn’t the subject line for this thread end with a question mark?
Question mark - it does now, thank you both for your help i will let you know how i get on
-
☆ A M B ☆
- 24,524 Posts
If you want a snippet to simply contain a line for including an external file, do it like this:
<?php
include 'path/to/file.php';
$output = $included-files-output;
return $output;
// or just return; if no need for output
You can use this method for templates, snippets, chunks, plugins and modules. It’s an excellent way to reduce the load on the site cache file too.
There is a rather exhaustive discussion on "good form" for creating snippets here
http://wiki.modxcms.com/index.php/Creating_Snippets
Keep in mind that snippets are processed through the eval() function, so they may not always behave as expected.
hahahahahahahaha brillinat it really is that simple, wow i am impressed!!!!!!!
thank you for your help everyone, i will now start on integrating plugins / chunks / snippets etc.
Any advice on the best event calendar, which one????