Forum for discussing general topics related to Couch.
12 posts Page 1 of 2
Hello,

I have developed a site like this one : 20thingsIlearned.com
Can I easily make a site like that one except I would use a menu like this one : http://www.tamarawobben.nl

And does Couch have cvs import possibilities so I hope I can easily import all articles from my old site.

Roelof
Hi and welcome Roelof,

I had a look at http://www.20thingsilearned.com/ and it seems to be a very heavily JavaScript dependent site. Anyways, if you can create a dummy/placeholder site that duplicates the effects, we can certainly retrofit Couch into it to handle serving contents dynamically.

As for the menu you mentioned at http://www.tamarawobben.nl, that is a straightforward affair using cms:archives tag (http://www.couchcms.com/docs/tags-refer ... hives.html).
Oke,

I have the html of 2 pages already done. So I can try to make them work in Couch.
The homepage which contains a closed book and the first page where I want to make a introduction.

The only thing I can find in the pages is how to make a archive like this :
year
month1
month2
year2
month1
month2

Roelof
The menu on http://www.tamarawobben.nl/ is something like this -
Code: Select all
2005
   February
   May
   November
   December
2006
   January
   February
2007
   April
   ...

where the menu consists of two levels - the first one shows only the years that have published pages and the second level shows the months in the parent year.
The months are linked to an archive showing the pages published in that period.

To create this kind of two-tiered menu, we can use the cms:archives tag twice - once to list the years and nested within the top tag we can use the cms:archives tag again to list the months falling in the parent year.

Following is a sample snippet (I've kept the markup simple purposefully. You can easily convert it into UL/LI list)
Code: Select all
<cms:archives type='yearly' order='asc'>
   <cms:date k_archive_date format='Y' /><br />
   <cms:archives type='monthly'  start_on=k_archive_date  stop_before=k_next_archive_date  order='asc'>
        - <a href="<cms:show k_archive_link />"><cms:date k_archive_date format='F' /></a><br />
   </cms:archives>
</cms:archives>

Please note how we use the k_archive_date and k_next_archive_date variables set by the parent 'year' archive to constrain the child archives tag to fetch only months belonging to that year.

A sample output of the code above -
Code: Select all
2012
- June
2013
- February
- March
- April

Hope this helps.
Thanks, I will try that script as soon as I have the first page working.

I cannot get the flip working. If you goto the corner of the book you have to see a page a little bit flipping. See the orginal.

But on my site nothing seems to happen.

Roelof
I cannot get the flip working. If you goto the corner of the book you have to see a page a little bit flipping.

That part, I am afraid, does not involve Couch at all. As I said before, once you get the front-end working it'd be easy to retrofit Couch into it.
Hello

I know this is not a Couch question but I was hoping that someone could help me.

Roelof
Hello,

Another I think Couch related question.

Is it possible to load all the js files with one command into the template?

Roelof
Hi,

I suppose you mean minifying all JS files into a single file and loading that. Right?
If so, we don't have a tag for that right now.

However, compressing multiple JS and CSS files into single files is a useful feature for speeding up load times and we have a addon on our road map that does just that.
No,

What I mean is let's say we have a directory js with all the javascripts.
Then use one or more commands to read all the javascripts so I do not have to type 10 times the same html tag with another name.

Roelof
12 posts Page 1 of 2