Problems, need help? Have a tip or advice? Post it here.
11 posts Page 1 of 2
this is the second time i'm trying this and still i end up with the same problem.

After reading the documentation and creating my blog page, i managed to successfully create the page view of the blog, but the list-view is giving me quite a headache.
I have saved blog-list.htm in Couch's snippets folder as per the tutorial, but when i write
Code: Select all
<cms:embed 'blog-list.htm' />
and load the blog page, i get an unstyled page with no header, no navigation and no footer, nothing exists on the page except the blog title and content, and like i said - unstyled (ugly) :x

P.S: the page view of the blog is working perfectly though
---
You live many times, but only ever remember your lives.length - 1
---
Image
Hi cholasimmons,

Can you paste the code of the full blog.htm landing page and full list page.

If your getting a blank page it sounds like the
Code: Select all
<cms:if k_is_page>
else part is working but something is not right in the list template.

Are you using embeds for the header and footer? If you post full code here we can problably spot whats awry.
sure u just don't wanna steal my code? :lol: just kiddin' man.
the k_is_page is ok, i followed the tutorial twice and once from some other website, there's alot of styling (junk) code around the cms but let me get it for you..

and no i'm not using embed to include the header/footer but php's require_once

Attachments

---
You live many times, but only ever remember your lives.length - 1
---
Image
The only reason a page would render without any styles is if the stylesheet does not load. You should use absolute linking instead of relative linking. Let's say you linked your CSS file as follows:
Code: Select all
href="css/styles.css"
You would need to do one of the following:
Code: Select all
href="<cms:show k_site_link/>css/styles.css"
Or alternatively if the css folder is in the root:
Code: Select all
href="/css/styles.css"
hey cheesyproof, the css folder is in the root, i did try using an absolute link before, but not using the cms way, (didn't know bout that tag till now :) )
i guess when the styling works it's even worse, coz the page begins to style up, u can see the width is correct, the colours too, but zero text on the entire page, and the blank page is only about 50px in height,
let me update the files so you can check it out yourself

http://simmonsstudio.tk/blog

- check in a few minutes
:edit: my sql host is down AGAIN, give it a couple of hours :lol: jk
---
You live many times, but only ever remember your lives.length - 1
---
Image
@simmons,

From the screenshots you posted, it appears that you are using
<?php .. ?> statements within blog_list.html, which incidentally is an embedded snippet.
As it happens, raw PHP statements cannot be executed within embeds.

Please try the Couch tag for php e.g. this way:
Code: Select all
<cms:php>require_once('incl/head.php');</cms:php>


Does this help? Please let us know.
nope, i even changed the blog_list.htm to blog_list.php, all i'm getting is this:

Warning: require_once(incl/head.php): failed to open stream: No such file or directory in C:\UniServer\www\simmons\couch\tags.php(2222) : eval()'d code on line 1 Fatal error: require_once(): Failed opening required 'incl/head.php' (include_path='.;C:/UniServer/usr/local/php/includes;C:/UniServer/usr/local/php/pear;C:/UniServer/home/admin/www/plugins/pear/PEAR') in C:\UniServer\www\simmons\couch\tags.php(2222) : eval()'d code on line 1

do i have to move the header and footer files to couch's snippets/include folder too?
---
You live many times, but only ever remember your lives.length - 1
---
Image
We are on the right track.
The error require_once(incl/head.php): failed to open stream simply suggests that the path to 'incl/head.php' needs adjustment.
You can try using a full path e.g. by prefixing <cms:show k_site_path /> to the require statement as follows
Code: Select all
<cms:php>require_once('<cms:show k_site_path />incl/head.php');</cms:php>

Of course, in the code above I am assuming the 'incl' folder is in the site's root folder. If not, please adjust the path.

Alternatively, try using the raw <?php statements directly on the blog.php template itself (since this is executed directly by PHP (i.e. is not a cms:embed), the PHP statements will work here.

Finally, if the 'incl/nav' etc. do not contain PHP, best way is moving them to the 'snippets' folder and using cms:embed tag to incorporate them.
the problem here isn't Couch after all, the last post you sent has sorted out the styling issue, I've figured out where the problem is.

With the original blog/portfolio page (page-view) my header or background image came down to about 200px from the top of the browser, I wanted the main body of the page to begin immediately under the navigation bar so i used
Code: Select all
#mainbody {margin-top:-160px}
to compensate by pulling the main body div up all the way to the navigation bar, however when Couch loads the list-view page between the
Code: Select all
<cms:else />
and
Code: Select all
</cms:if>
conditions, the main body div presumably is at the right position already, so the -160px measurement given in margin-top is causing the entire page to move up out of the viewing area completely.
I've tried changing this figure to 0, and even though it brings the main body div back down to a normal position, I can see my header and navigation bars are still not available, neither is the footer :cry:
---
You live many times, but only ever remember your lives.length - 1
---
Image
, I can see my header and navigation bars are still not available,

As I said in my last post, make sure the header and nav PHP files do get included.
11 posts Page 1 of 2
cron