Problems, need help? Have a tip or advice? Post it here.
28 posts Page 2 of 3
Hi Simon,

If the editable region used for blog_content is richtext, the CKEditor will push in a <P>, so that cannot be avoided. What we can do is, use a wrapper DIV within which we can call the 'show'. This wrapper div can then be given any CSS style you want.
For example -
Code: Select all
<div class="text-blog" >
   <cms:show blog_content />
</div>


Let me know it this helps.
KK wrote: Hi Simon,

If the editable region used for blog_content is richtext, the CKEditor will push in a <P>, so that cannot be avoided. What we can do is, use a wrapper DIV within which we can call the 'show'. This wrapper div can then be given any CSS style you want.
For example -
Code: Select all
<div class="text-blog" >
   <cms:show blog_content />
</div>


Let me know it this helps.


Sorted mate thanks that worked well :lol: removed the <p> tag from my styles, and then within the main blog page not the blog_list edited it and added a blank div area for the style which worked..

Please see my other topic
Need some more help.

I'm in need of adding some more to a page.

We have the blogs page and the blog_content and the blog_image and everything else with this, works fine, uploads fine. Now the problem i have is sometimes on the page we post lets say 5images with text under them. So i started a new div and do a few edits. Now this wont work.

What i wanted it todo was inside the post made, within the features part, i wanted it so i can add an image and some text, and the same again, not repeat it but add other images on and some text, so the blog_content and the blog_image. Is this possiable? all it would do is sit under the above one and keep going like that. So i can add more text and more images as sometimes text would become under the image ect. and would be more than one image
Hi Simon,

One way to do it would be to enter all the text and new images within the same blog_content richtext editor (you can upload images from within the editor too). However this way you lose the strict control that you have over the presentation that you otherwise have with fixed editable regions.

Another way could be - if you have some upper limit to the number of text and images blocks that will go in one page, you can define as many editable regions (i.e multiple) on the page.
Not all the regions need to be filled. You can check if the editable region is empty or not and display the contents only if there is some content within it -
e.g.
Code: Select all
<cms:if "<cms:not_empty blog_content_1 />">
  <div class="blog_text">
    <cms:show blog_content_1 />
  </div>
</cms:if>

Hope that helps. Please let me know.
I'm not trying to hijack this thread, sorry if I do somehow; But I must add that your support is simply amazing and very well done. Keep it up!
gSvoren Design - http://gsvoren.net
gSvoren wrote: I'm not trying to hijack this thread, sorry if I do somehow; But I must add that your support is simply amazing and very well done. Keep it up!


Hijack Alert!!! Just joking, i agree with you 100%.. Ive learnt alot so far so im going to start helping others. and thats only in to days :lol:
KK wrote: Hi Simon,

One way to do it would be to enter all the text and new images within the same blog_content richtext editor (you can upload images from within the editor too). However this way you lose the strict control that you have over the presentation that you otherwise have with fixed editable regions.

Another way could be - if you have some upper limit to the number of text and images blocks that will go in one page, you can define as many editable regions (i.e multiple) on the page.
Not all the regions need to be filled. You can check if the editable region is empty or not and display the contents only if there is some content within it -
e.g.
Code: Select all
<cms:if "<cms:not_empty blog_content_1 />">
  <div class="blog_text">
    <cms:show blog_content_1 />
  </div>
</cms:if>

Hope that helps. Please let me know.



Worked fine dude, :)


Ok i want some extra areas to imput within the blogs posts, you have the name, title, text, then one image but wanted to have some extra text areas that would imput directly into the blog post where i tell it to? and have more than one as such.
Hi Simon,

To create editable regions you can use the 'editable' tags. For example -

Code: Select all
<cms:template title='Blog' clonable='1' >
    <cms:editable name="body" label="Body" type="richtext" />
    <cms:editable name="excerpt" label="Excerpt" type="textarea" />
</cms:template>

There are several different types of regions that can be created e.g. text, richtext, image, dropdown etc.
Please see the following topics in documentation for details -
http://www.couchcms.com/docs/concepts/e ... gions.html
http://www.couchcms.com/docs/tags-reference/editable/
http://www.couchcms.com/docs/tags-refer ... tarea.html
http://www.couchcms.com/docs/tags-refer ... htext.html
Just a question.

Ok, Ive done the Blog.php no problems and then placed the blog_list within the snippets. Insted of putting blog_list.html i've put blog_list.php and its worked fine.

Now within my template's i have some includes which control all my pages nav bars foot ect, this is the way its got to stay otherwise ill have to edit the who lot again, such as the old pages.

Now the include file goes like this on a normal page.

include/footer.html

Now so because its within a nuther folder ive put in ../include/footer.html to find the folder and file. this still dont work and i dont understand why not. should i be putting ../../include/footer.html as the blog_list.php is within couch/snippets/blog_list.php
Hi Simon,

The files embedded using the 'embed' tag are expected to be regular templates i.e. HTML interspersed with Couch tags. Although you might have renamed the embedded file to have the extension of '.php', PHP code within it will NOT be executed automatically.
Please recall that it is Couch that is processing the template and not PHP runtime.

However, you can ask Couch to invoke PHP explicitly by using Couch's 'php' tag.
Thus if the original include statement in the PHP file was
Code: Select all
include 'footer.html';

modify it to make it
Code: Select all
<cms:php> include 'footer.html'; </cms:php>

You do not have to make any change to the original path used in the include. Just take whatever was the original code and wrap it within couch php tags.

Please let me know if it helps.
28 posts Page 2 of 3

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests