23481 Posts in 18951 Topics by 2878 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
|Go to End||Next >|
20 March 2012 at 11:53am
You shouldn't need to do any thing like:
<div style="text-align: right; margin-left: auto; margin-right: 0; width: 100%;"><img class="right" src="assets/MyImage.JPG" alt="test" title="test" width="100" height="100" /></div>
The point of using a CMS, such as SilverStripe, is to be able to create web pages without having to use any code whatsoever.
You need to put:
in your template somewhere, in the theme that you are using (not the tutorial theme)
If images are wrapped in a div that has the class typography then everything should work fine.
20 March 2012 at 12:20pm
The div is actually not necessary. This alone positions the image at the right side with text wrap:
<img class="right" src="assets/MyImage.JPG" alt="test" title="test" width="100" height="100" />
But the following defeats it:
<div class="captionImage right" style="width: 100px;">
The above div is inserted by tinymse when placing the image.
Repeating the process to check, if I start with no image, place the cursor before the first word of the 2nd paragraph, and insert the image, it appears at left with no text wrapping.
If I then remove the div manually, the image appears on the right, with text wrapping, as should be the case.
So tinymse is adding a div that should not be there. IMO.
20 March 2012 at 12:25pm
You should not need to make any edits to any html code if it is configured correctly. Perhaps this will help
20 March 2012 at 1:21pm
In my 4th post in this thread (on page 1), I replied to you, identifying my SS version as 2.4.7. I also listed the files in which I had found
<div id="Content" class="typography">
These files are in themes/tutorial/templates/layout/
In the Black Candy theme, in the following folder,
I have found <div class="typography"> in the following files:
Are these the files in which <div class="typography"> should appear?
20 March 2012 at 1:31pm
That entirely depends on which theme your site is set to use in mysite/_config.php or in the CMS
It will be completely ignoring:
If the theme your site is set to use is neither Blackcandy or Tutorial.
So: In YOUR theme, make sure class="typography" is specified in the div containing your content.
20 March 2012 at 1:43pm
The CMS indicates that my present theme is Black Candy. Using the cPanel file manager, I have navigated to
and when I open these two files:
I see this at the top:
If this is correct, then there must be another reason why tinymse is inserting an incorrect div when I insert an image.
I would be interested to hear your thoughts.
20 March 2012 at 1:53pm Last edited: 20 March 2012 1:54pm
My thoughts are as follows:
Install a development environment on your local machine and get it working there before trying to get it working in on a real web server.
Then, once it is working:
and upload your site back up to your server.
Using cPanel to make edits to code is a really inefficient way of doing so. Using FTP to upload/download your code edits in the future will save you a lot of time.
You may also need a text editor, such as http://notepad-plus-plus.org/
Delete everything and do a fresh install of SilverStripe. WYSIWYG and Image Alignment works perfectly out of the box.
20 March 2012 at 1:54pm
As an additional test, I unpacked theSS 2.4.7 download on my local xp computer, and search the contents for "captionImage".
Windows found the string only in these files:
and in lib.js which is in assets\_combined files
The string does not appear in the blackcandy or tutorial themes.
Hence, it seems to me, tinymse is expecting a style that does not exist in the two default themes, which are blackcandy and tutorial.
|Go to Top||Next >|