Page 1 of 1
[solved] content area purely for image(s) - newbie
Posted: Fri Sep 14, 2007 2:52 pm
by howey
I have just installed CMSMS and started to look at creating/modifying some templates. I would like to separate the content areas of text from the content areas for images, rather than inserting an image within the text.
Is there a separate way of doing this other than specifying a content area on the page and then using the WYSIWYG editor to add an image. I am just thinking from the "editors" point of view to help distinguish between text that they can edit and pictures that they can change.
Re: content area purely for image(s) - newbie
Posted: Fri Sep 14, 2007 3:43 pm
by cyberman
howey wrote:
Is there a separate way of doing this other than specifying a content area on the page and then using the WYSIWYG editor to add an image.
Maybe you know it - you can have more than one content area with
{content block='image'}.
If I'm right a real image block type will come with V 2.
Another way could be to use name of page to show a file. Image must only have the same name like the page. You have only to add something like
iinside your template.
Hope that helps.
Re: content area purely for image(s) - newbie
Posted: Fri Sep 14, 2007 6:05 pm
by calguy1000
You could do something like this in your template
Code: Select all
<img src="{content block='image_name' oneline='true'}"/>
and it would generate a one line field when editing a page where you could type in the relative path to the image.
Re: content area purely for image(s) - newbie
Posted: Fri Sep 14, 2007 10:51 pm
by Pierre M.
Nice tip Calguy, thank you

May be an example of Smarty's power for your Smarty thread for power users ?
Pierre M.
Re: [solved] content area purely for image(s) - newbie
Posted: Sat Sep 15, 2007 2:11 pm
by howey
Thanks for the tips – I shall probably stick to the secondary content block as it will be easier to browse for the image.
Many thanks
