Important announcements from CouchCMS team
32 posts Page 2 of 4
@KK

You know, I've used relations several times but they did not pop up in my head to use for this specific usage, lol! Thanks KK :) That's a brilliant idea and I have it all working now! Validation and all, people can access the query param via www.example.com/template/catagory
This means we can manipulate the URLs further, allowing us to be more friendly for google than before.

I will enjoy this addon very much, as I'm sure will others. I look forward to seeing some very advanced applications coming out of this :)
Image
Hello, just a small issue that I discovered during looking through Tutorial files..
In the file "pads/page_view.html":
Code: Select all
<cms:pages masterpage='pads.php' id=rt_id limit='1' show_future_entries='1'>      
    <cms:set my_current_pad=k_page_title 'global' />
    <cms:set my_current_pad_name=k_page_name 'global' />
    <cms:set my_current_pad_id=k_page_id 'global' />
    <cms:set my_total_records='0' 'global' />
</cms:pages>

<cms:capture into='my_content' >
      <table class="notes">
        <tr>
          <th class="note">Note <a href="<cms:add_querystring k_page_link 'sort=name' />" class="sort_arrow" >&uarr;</a><a href="<cms:add_querystring k_page_link 'sort=-name' />" class="sort_arrow" >&darr;</a></th>
          <th>Pad</th>
          <th class="date">Last modified <a href="<cms:add_querystring k_page_link 'sort=date' />" class="sort_arrow" >&uarr;</a><a href="<cms:add_querystring k_page_link 'sort=-date' />" class="sort_arrow" >&darr;</a></th>
        </tr>

...

This type of sorting (using k_page_link) is nice for 'notes/list_view.html', but for Pads I suppose it should be:

Code: Select all
<cms:pages masterpage='pads.php' id=rt_id limit='1' show_future_entries='1'>      
    <cms:set my_current_pad=k_page_title 'global' />
    <cms:set my_current_pad_name=k_page_name 'global' />
    <cms:set my_current_pad_id=k_page_id 'global' />
    <cms:set my_current_pad_link="<cms:route_link 'page_view' rt_id=my_current_pad_id />" 'global' />
    <cms:set my_total_records='0' 'global' />
</cms:pages>

<cms:capture into='my_content' >
      <table class="notes">
        <tr>
          <th class="note">Note <a href="<cms:add_querystring my_current_pad_link 'sort=name' />" class="sort_arrow" >&uarr;</a><a href="<cms:add_querystring my_current_pad_link 'sort=-name' />" class="sort_arrow" >&darr;</a></th>
          <th>Pad</th>
          <th class="date">Last modified <a href="<cms:add_querystring my_current_pad_link 'sort=date' />" class="sort_arrow" >&uarr;</a><a href="<cms:add_querystring my_current_pad_link 'sort=-date' />" class="sort_arrow" >&darr;</a></th>
        </tr>

Using "my_current_pad_link" value.

UPD: and also, just for accuracy, in the files discussed above ("pads/page_view.html", 'notes/list_view.html') the lines
Code: Select all
            <cms:no_results>
                <tr colspan='3'>
                    <td><p>No notes created yet.</p><td>
                </tr>
            </cms:no_results>

should be replaced with
Code: Select all
            <cms:no_results>
                <tr>
                    <td colspan='3'><p>No notes in this pad yet.</p></td>
                </tr>
            </cms:no_results>

Unclosed <td> and wrong colspan caused some errors in my testing workaround... Yes, it's a small issue and the design is just for testing, but if it will be public-accessible, why not make it perfect)

Thanks!
Excellent catch!
Thank you very much, Musman. I've updated the downloadable sample files.
Can somebody reply what I can do with this code. Any real live project you can name? I just did not understand the usage.
* * * * * * I LOVE COUCH CMS - flexible and straight forward * * * * * *
Any real live project you can name?
@chichi, the tutorial here has a real project -
http://www.couchcms.com/docs/advanced-tutorial/

It is, of course, not live. However, the installation instructions are included so try setting it up and play around to see how it works.
@chichi, the addon is for applications with create\edit\delete functions. Before we had to use smth like
Code: Select all
[url: http://www.yoursite.com/invoice/invoice-190.html?mode=edit&parent-relative-id=11]
<cms:gpc get mode />
-- staff for mode [edit]
<cms:gpc get parent-relative-id />
-- staff for involving related page from different template

Now we can use custom routes and url "http://www.yoursite.com/invoice/190/edit/11". It's more reliable, because GET params should be validated, and Custom routes gives us great possibilities to validate, check rights and another conditions in 'filters'.

To name such apps: task trackers, users' event calendars, home finance systems, end even Social networks. Yes, with custom routes you can create own Facebook with a Wall (where user can edit\delete items), permanent links like "yoursocial.com/id111/albums/album-12092014" including user's own ID in url. Without CR we can't include in URL user's ID and make nice recognition of "/albums/album-12092014".
And so on!
Thanks I understand, its all about create\edit\delete functions for users on the website (NOT the CMS) and the ability to verify their input. Its not made for the usage in the admin section itself. Or did I miss something.

I have no use of this right now but is a great tool for an real estate portal, car selling platform, where users can offer via Login & Data ...
:)

My usage of CouchCMS is more simple to get content on the site done by one admin.
* * * * * * I LOVE COUCH CMS - flexible and straight forward * * * * * *
So, I was at first not super-excited with routes. I'd done something similar with snippets and using the <cms:gpc> functionality to grab passed information that I could then validate. There were some limits and bugs, but it wasn't a huge deal.

Then I started playing with the routes, and realized just how much power there is in combining all the individual tools Couch provides. The bugs I'd encountered before were gone, and Couch is almost a CMS-maker as much as a CMS itself.

Great job, KK!
Can custom routes be used to create user editable ratings for a page?
Can custom routes be used to create user editable ratings for a page?

Not sure what you meant by that @cardmaverick. Could you please elaborate?
32 posts Page 2 of 4

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest