Matrix Quick Start Guide


(Avi Miller) #1

Quick Start Guide to working with MySource Matrix


Once you’ve successfully installed Matrix, there are a few things you need in place to get things started. This guide will go through the critical elements required to get basic web content served by Matrix.



All of these steps should be performed in the Administration Interface, which is accessible by appending “/_admin” to the end of the URL you use to access the Matrix webserver.



1. Install Matrix

You should follow the Installation Instructions to setup Matrix. This will configure your Matrix system.



2. Create a Parse File

Matrix relies on a design to format your content appropriately. Designs are based on HTML (or XHTML) with a few MySource tags added to display Matrix content. Download a copy of the MySource Matrix Design Guide from our Installation Instructions for more details about all the tags that are available.



For now, here’s a basic parse file that contains inline formatting:

[html]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml”>

<head>

<title><mysource_print id_name=“global” var=“site_name” /> : <mysource_print id_name=“global” var=“asset_name” /></title>

<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />

<style type=“text/css” media=“all”>

body {

background-color: #fff;

color: #000;

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: small;

}

</style>

</head>



<body>

<mysource_area id_name=“body” design_area=“body” />

</body>

</html>[/html]



The Design Guide contains all the information about building customised menus, embedding external content or creating navigation (breadcrumb) trails. For now, this is enough to display our content when we click the “Preview” button.



You should cut and paste the above code and save it to your local machine as “parsefile.txt” (or any name you chose). When you create a Design in Matrix, you will upload this parse file to create the design template.



3. Create the Design asset

In the Administration Interface, click “Add” in the Asset Map (on the left-hand side) and select “Design.” If you intend having multiple designs, you might find it easier to create a folder to contain all your designs, but for now, we’ll just create the design in the root. Target the Design by moving your mouse underneath “System Management”, to create a dashed red line. This line indicates the new asset will be created at the same level as the asset above.



After you left-click and select “Create here”, the right-hand panel will reload and ask you for the name of the Design asset you are creating. Go ahead and name it anything you like, but for the purposes of this Guide, I’ll be referring to it as the “Sample Design” from now on.



4. Upload the Parse File

When your Design asset is created, click the “Lock” button to enable the editing interface.



Once the asset is locked, you will see the “Parse File” section. Click the “Browse” button, find the sample parse file you saved earlier and then click “Commit” – this will upload the parse file to your Matrix server and Matrix will process it to produce a Design template. For more advanced Designs, you can also upload associated files, like external CSS files or images. Again, see the Design Guide for more information about this.



Once the parse file is uploaded, your Design is ready!



5. Create a Site

All front-end assets need to exist under a Site asset. The Site asset allows you to set Root URLs for the content. Just like the Design, click the “Add” button in the Asset Map and select “Site.” Create the site under your Sample Design. For our purposes, call your Site “Sample Site”. Once the site is created, right-click the Site asset in the Asset Map and chose the “URLs” menu option.



Using the same locking technique, lock the URLs panel and enter the same URL you configured in during the installation. You also need to specify whether this site supports http://, https:// (SSL) or both. Once you’ve entered the URL and ticked at least the http:// checkbox, click Commit to save it.



6. Assign the Design to your Site

Matrix not only supports multiple sites, but multiple designs as well. We need to tell Matrix which design to use for this site. You can even use multiple designs in one site, so take a look at the Administration Manual for more information about this.



Right-click your site asset and click “Settings.” Lock the page to enable the editing interface and click “Change” under the “System Defined - Frontend Design” heading. This will put the Asset Map into select mode (as indicated by the pale red background and flashing red border). The Asset Map knows what kind of asset is appropriate for each selection panel, so only Designs will be active at the point. All the other assets will become greyed out. To chose your design, right-click the “Sample Design” asset and click “Use Me”. You’ll see the asset name and ID appear in the dashed box next to “New?” To save your selection, click the “Commit” button. You have now associated your Sample Design with the Sample Site.



7. Create a Page

The final step is to create a page of content. MySource Matrix ships with a “Standard Page” asset, which can be found in the “Pages” sub-menu under “Add”. Go ahead and create a Standard Page, but this time, create it UNDER the Site. To do this, ensure that the red targeting line that appears after you select “Standard Page” from the “Add” menu is a solid arrow pointing towards the Sample Site asset. This indicates that the new asset will be created as a child of the target asset.



Now that you’ve created a page, expand the Site by clicking the + icon that should appear and right-click the Page asset you just created. You’ll now see an “Edit Contents” option. When you lock the “Edit Contents” panel, you’ll see the initial content container that is automatically created with each page. The documentation includes additional information about creating multiple content containers and the various container types that are available. For now, either click the green “Edit Contents” button or click anywhere inside the dashed box to enable the WYSIWYG editor.



Go ahead and type anything you like inside the container once the editor is enabled. To save your content, click the “Commit” button in the bottom right-hand corner of the panel. No changes are saved until you click that button!



8. Set the Home Page for your site

Now that you’ve created a page, you can go back to your Site asset and configure that page as the “Home” page. This is the page that will be displayed when the user visits your URL (like the index.html page).



To do this, right-click the “Sample Site” asset and click “Details.” Lock the panel and use the selection system under Special Page Links to select your Standard Page asset as the Index link.



9. Preview and Profit!

There are two ways to Preview content that’s Under Construction (which is the initial state for all assets you create in the Administration Interface). Either right-click the asset and click the “Preview” menu option or use the “Preview” icon in the top right-hand corner. If the “Preview” menu option is greyed out, you may need to manually refresh the Asset Map by clicking the “Refresh” button (its the first icon to the right of the Add button in the Asset Map).



When you do click “Preview”, a new browser window should open showing you your new page. That’s it!



Remember that these assets are still Under Construction, so they’re only visible to users who have permission to see them (Matrix automatically logs you in when you use either of “Preview” options). In order for the general public to be able to see your content, you have to assign Public read access to both the Design and the Site and you have to change the status of both the Design and the Site to “Live” – see the Administration Manual for more information about how to perform these tasks.



Problems? Stuck?

If you’re having problems or are stuck, feel free to post a message here and we’ll be happy to help you out.


(Bernt Andreas Drange) #2

Oh, thanks for that post! Wish I'd seen it before I spent hours messing around, finally making it impossible to log in and just having to reinstall the whole system :wink: So everybody: READ THIS FIRST!


At least it works now, I'm editing my first page with mozilla firefox and loving it! The new linking interface is a vast improvement to the 2.x one. Mildly put.



Just wanted to let you know that the wysiwyg-editor doesn't work on the /_edit-interface, in Internet Exploder it's all botched, and firefox gives you php warnings that headers are already sent if you try to make new divs or tables, while the editing window acts up on you.



It works fine on the /_admin interface though.



I'm using the exampe parse file from this thread.



Cheers, Bernt!


(Avi Miller) #3

There's a quick and easy way to fix the problems with the sample parsefile in Simple Edit (i.e. /_edit mode): Take the <!DOCTYPE …> declaration out of the parsefile.


There is a conflict between strict XHTML compliance and the mechanism for adding/editing DIVs (which we are obviously working on for the final release of Matrix).


(J) #4

I had a hard time finding this thread. You should pin it in the installation category, as it would have been awesome to find last night. :wink:


Jonathan


(Zeno) #5

I had a hard time with Matrix trying to parse the design file given in the example, which constantly caused php to run out of allowed memory. Couldn't work out why changing the memory_limit in my php.ini file wasn't helping…


Eventually found the "ini_set('memory_limit', '8M');" line in matrix/core/web/index.php



Presumably 8M became insufficient somewhere between RC1 and RC2?


(Avi Miller) #6

Thanks for the feedback. I'll pass it on to the developers.


(Eric Blanchi) #7

When editing content I get:

[quote]NOTE: This asset does not have a design applied to it for the URL currently being edited.

[http://my.current.url/mypage?no_cache=1]. No style information is available to use for content editing.[/quote]

Everything else seems to work, and I haven't skipped anything mentioned in the quick start guide. I hope this is the right place to post my questions.



How do i fix that notice?

How do i specify which styles to populate in the WYSIWYG?


(Greg Sherwood) #8

I think this was actually a bug that was fixed. The no_cache=1 bit is probably stopping it from finding the design. The next upgrade should fix this.


In general, this message does mean that no design was found for the asset you are editing, and so the CSS files cannot be parsed to find styles for the WYSIWYG.



If you dont get this message, the WYSIWYG styles come from the CSS files attached to your design. You dont need to specify anything.


(Eric Blanchi) #9

Thanks Greg, i'll wait for the upgrade…
Is there a way to filter what styles the WYSIWYG takes from the CSS?

Some of our styles for example are only for layout purpose and should not be used in the content authoring.


(Intactwww) #10

I seem to be stuck on step #8.


I've got a Site ("Testing, Testing") created, and a page ("blah") created immediately under the site.



I right click the site, click Details, and give the Lock button a whack.



The "Index Page" section contains a textbox and a Change, Clear and Reset button.

Doesn't look like a dropdown box or anything…

The Change button doesn't pop up a dropdown box or pop open a new window…



Tried typing "blah" in the text box and hitting Change.

Tried also typing "blah" and hitting Commit.



… Help?


(Luke Wright) #11

nemesis-- what you've come across is an asset finder, which is what is used in a number of places which call for assets to be selected. When you hit the Change button the asset map should turn a purple-ish colour. When it's that colour, right-click on a page asset and select 'Use Me' to select that asset (its name and asset ID should appear in the text box). When you commit the page the asset should be listed in the text box.


Hope that helps. :slight_smile:


(Greg Sherwood) #12

wombat - no you cant filter the list. Every style that begins with a fullstop (.) is displayed in the list. Any styles that begin with a hashe (#) will not be displayed - so you could consider changing the styles to apply to elements based on IDs.


(Intactwww) #13

Nope, its not turning purpley…
The Java Console isnt showing any errors at all, which is odd…



System config:

Win XP Sp1



Tried in two browsers;

IE6 SP1, Mozilla Firefox 1.0 Release

Sun JVM 1.4.2_05


(Davidc) #14

Question and Note


Note: When setting the SQ_CONF_SYSTEM_ROOT_URLS you may need to have www. at the beginnning. And I don't think you should put a slash at the end. I just installed 3.6.0 and couldn't assign a URL to my site. I am using a subdomain for testing, so this could be the problem. These failed: "subdomain.domain.com/" and "www.subdomain.domain.com/". The only thing that worked was "www.subdomain.domain.com"



Question 1: How do I specify multiple URLS, comma seperate, colon seperate? I have looked and looked and can't find any information.



Question 2: Are there any notes on creating / integrating applications with MSM. I.e I would like to create some PHP pages managed through MSM and just want to plan the best way to integrate them. Ultimately I would like to create the pages using a Rapid Application Development (RAD) environment like CodeCharge Studio and deliver one consistent looking site. Is there any info I have't found yet, or could you suggest a few things.



Dave


(Avi Miller) #15

Firstly, the System Root URLs need to be all the possible URLs you want to be able to apply to a site. So, if you want domain.com and www.domain.com to work, you'll need to add both as System Root URLs and apply both to the particular site.


Also,


  1. Multiple URLs are specified per line. You configure this in the System Configuration screen in the Administration Interface.


  2. There are a few ways, depending on what the pages do. Matrix itself could be used as the framework for creating new functionality, if you create Matrix assets instead of standalone pages. You should post questions and such in the Developer forum for more information.

(Gedr) #16

[quote]nemesis-- what you’ve come across is an asset finder, which is what is used in a number of places which call for assets to be selected. When you hit the Change button the asset map should turn a purple-ish colour. When it’s that colour, right-click on a page asset and select ‘Use Me’ to select that asset (its name and asset ID should appear in the text box). When you commit the page the asset should be listed in the text box.


Hope that helps. :slight_smile:

[right][post=“1975”]<{POST_SNAPBACK}>[/post][/right][/quote]





Iam having a similar issue



When i hit the change button, nothing happens. - the asset map doesnt change colour.



Whilst investigating the problem, I noticed that when i lock the settings and the page reloads, i can see the locked page but explore throws an error. When i check the details its states permission denied. Sounds like i made an error during installation?


(Fo) #17

Hi,


I've done all the steps described in the first post of this topic, but…

now when Im trying to preview my site Im getting apache error:



Not Found



The requested URL /site/_nocache was not found on this server.



what should I do ? or what I've done wrong ?



any hints ?



regards.

Fowowski


(Anthony Barnes) #18

It sounds like apache doesn’t have the necessary aliases to tell the traffic to be handled by matrix.


Check out this thread for some good info on installation via CLI (assuming that is the way you are installing your system):



http://forums.matrix.squiz.net/index.php?showtopic=21


(Avi Miller) #19

[quote]I’ve done all the steps described in the first post of this topic, but…
now when Im trying to preview my site Im getting apache error:

[right][post=“8470”]<{POST_SNAPBACK}>[/post][/right][/quote]



Actually, that sounds more like you haven’t applied a URL to your site. On the URL screen of the Site asset, you need to add at least one URL, and that URL must be listed in the System Root URLs section of the System Configuration screen as well.


(Ian Symonds) #20

Hello


I believe I’ve found a situation where the asset finder does not turn purple when choosing a design.



I have an install in which I’m doing evaluation and self training. It does not have a registered DNS entry.



It does not have a site url either. I haven’t been able to register a url for the site. I believe this is related to the lack of DNS entry for this machine.



So, I’m testing my site, from this machine only… as http://localhost/sitename/pagename



If I access the admin site under http://localhost/sitename/pagename - the asset finder does not turn purple.



If I access admin via http://localhost/sitename/pagename - it all works fine. As long as you’re only planning to use it from the single machine.



If you haven’t got a site url established, use the admin interface via the local ip address 127.0.0.1 .



Hope this helps