Problems, need help? Have a tip or advice? Post it here.
9 posts Page 1 of 1
Hello everyone!
I've been using Couchcms to do a Blog and first of all, I wanna congratulate everyone who as been involved on the development!
In the Blog, there's going to be different authors posting, and for that reason i've used the snippets "list_authors.htm" and current_author.htm.
Is there anyway that Couchcms can create automatically a folder with a specific author? In the article, it's the name and the category displayed but I would like that the name of the author would had a link to his post's.

Code: Select all
                    <h5 class="padding-blog" style="color: black; letter-spacing: 1px;">
                        Published <cms:date k_page_date format='%d %b %Y' locale='portuguese' charset='ISO-8859-1' />
                        <!--<cms:date k_page_date format='%R' locale='portuguese' charset='ISO-8859-1' />-->
                        by
                        <cms:if autor !='-'>
                            <cms:show author /> -
                            <cms:show k_page_foldertitle/>
                            <cms:else /> Without author
                        </cms:if>
                    </h5>


Thank you!
Hi,

I'd suggest you use a separate clonable template to add the author names.
Then 'relate' the blog template (many-to-one) with the authors.

This way you can easily query and show all posts related to a particular author.
This akin to tagging - please see viewtopic.php?f=8&t=8952 for details.

The authors, however, won't be automatically created above i.e. you'll have to manually maintain a list of authors (as cloned pages of authors template). If the number of authors is limited, this shouldn't be a problem.
Thank you for the response! I'm going to start trying to implement it !
Well, I'm feeling a lot like a nub ...

I'm getting this error "ERROR: Tag "related_pages": masterpage 'tags.php' not found"

:cry:
Are you sure you have implemented a template named 'tags.php'? It should be visible in the admin sidebar if it is properly registered. Else, please visit it as super-admin.
On the "blog.php", I currently have this code:

Code: Select all
<cms:template title='Blog' clonable='1' dynamic_folders='1' icon='folder' order='1' parent='_blog_'>
       
    <cms:editable name='keyword' label='Keyword frow the news' type='text' order="1" />

    <cms:editable name='description' label='Description' type='text' order="2" />
   
    <cms:editable name='author' label='author' opt_values='author_list.htm' opt_selected='current_author.htm' dynamic='opt_values | opt_selected' type='dropdown' order="3" />
   
    <cms:editable name='tags' type='relation' masterpage='tags.php' label='Tags' order="4" />

    <cms:editable name='img' label='Img' type='group' order="5" />

    <cms:editable name='content' label='content' type='richtext' order="6" />

</cms:template>


I've created a the "tags.php" with:
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>


<cms:template title='Blog Tags' clonable='1' ></cms:template>

<?php COUCH::invoke(); ?>



After entering the CouchCMS as a SuperAdmin, I have receive always the same response:
" Error: masterpage: "tags.php" not found. "

Thank you for your attention!
Please try this -

1. Temporarily remove from blog.php the line of code adding the relation. Visit blog.php as super-admin for the change to persist. Now you should be able to use the admin-panel normally.

2. Next visit tags.php as super-admin. This should register the template - a confirmatory sign of this is that the template should be seen listed in admin-panel-sidebar.

3 Once you are sure that tags.php is registered and available, add the relation we removed in step one back to blog.php. Visit it as super-admin.

Things should work as expected now.
Point of the exercise above was that at the time we add the relation field to a template (blog.php in this case), the related template (tags.php in this case) should be registered with Couch.

Hope it helps.
It's perfect!! KK, you are a CouchCMS god!

Thank you very much!
I am glad I could help :)
9 posts Page 1 of 1
cron