Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    May 2008
    Posts
    79
    Thanks
    12
    Thanked 0 Times in 0 Posts

    How to implement a CMS into a pre-designed site?

    I've been trying to figure out how to use a CMS. Is it possible to implement a CMS System into a website I built in XHTML/CSS? I went to opensourceCMS.com and did some demos, but they all run off a default template. How would I add my own code and then get the CMS implemented on top of that code?

    Thanks!

  • #2
    New Coder
    Join Date
    Feb 2009
    Location
    Texas
    Posts
    56
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Hi aejacks8,

    Its not easy to explain how to do this, but I will give it my best shot.

    If you look at the default template (the source files) you will see PHP includes, usually on most CMS's this is what they use, say, a sidebar menu shows "Categories" and the categories listed, you might see this:

    Code:
    <?php include('modules/categories_horizontal.php'); ?>
    you could insert that into your index.php file (just rename your .html file to .php so your server can read the PHP tags) where you would want the sidebar
    "Categories" to show up.

    It would go on with "title", "content", "footer", "copyright" and you would use PHP includes to include what you wanted, where you wanted it.

    I don't know if I explained this in an understandable fashion, or if the CMS you are using even uses PHP includes, (which I am almost positive it does).

    Depending on your CSS file, and the PHP files, you may have to either modify the PHP file, or the CSS, for example:

    Say the PHP file has the "categories" menu not as a list, such as

    Code:
    Home
    <br />
    Products
    <br />
    About Us
    <br />
    Contact Us
    but you had your css on your side bar coded as an unordered list,

    Code:
    <ul>
    <li>Home</li>
    <li>Products</li>
    <li>About Us</li>
    <li>Contact Us</li>
    </ul>
    You would either have to modify your CSS code, or do what I would do, and modify the PHP include file to output how you would want it to. You don't need to know alot about PHP to edit the output information, I know very little about PHP (but am in the process of teaching myself), but a quick lesson from w3schools.com on PHP should get you through.

    I hope that any of this made sense, or even helped.

    Sincerely,
    Camron
    Free PSD to XHTML/CSS conversion - Dimby.net
    Which doctype should I use?

  • #3
    New Coder
    Join Date
    May 2008
    Posts
    79
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Thats what I thought it would be. I'm not using any right now, but I want to use Joomla!. I understand the idea of Includes, but what is in each section? For example, how do I setup the sidebar or title or content? Is it just plain text that can be inputted/edited on the admin side?

    Thanks!

  • #4
    New Coder
    Join Date
    Feb 2009
    Location
    Texas
    Posts
    56
    Thanks
    6
    Thanked 3 Times in 3 Posts
    The includes, do you mean how do you control the content that is shown? Or, how do you control how the content is show.
    Free PSD to XHTML/CSS conversion - Dimby.net
    Which doctype should I use?

  • #5
    New Coder
    Join Date
    May 2008
    Posts
    79
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Both actually. I'm interested in how or what to add to my code to align it with the CMS. Maybe I'm looking for the wrong thing...

    I basically want to be able to edit the content of the page via a web-interface. Thats a CMS right?
    Last edited by aejacks8; 03-08-2009 at 12:52 AM.

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,471
    Thanks
    6
    Thanked 980 Times in 953 Posts
    I know CMS Made Simple very well and there you can create your own templates. Basic implementation is pretty simple (as the name implies):
    1. You create a new template, copy your HTML into the textarea and then replace the HTML that marks up the content of your page (as opposed to header and/or footer) with the {content} tag.
    2. You create a new stylesheet, paste your CSS in there and attach that stylesheet to the previously created template.
    3. Then you create a new page and insert whatever content you like (i. e. copy and paste the content from the content section of your current HTML document), choosing that newly created template as page template.


    This way you can create many pages using the same template, and you can format your content with TinyMCE or whatever editor you like.

  • #7
    New Coder
    Join Date
    May 2008
    Posts
    79
    Thanks
    12
    Thanked 0 Times in 0 Posts
    VIPStephan - Thanks a lot! I will definitely check that out. It sounds like it is exactly what I'm looking for.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •