Problems, need help? Have a tip or advice? Post it here.
70 posts Page 3 of 7
Previous 1, 2, 3, 4, 5, 6, 7 Next
Ok, i will take a look at repeatable regions.

Did you have any look on my problem with the calendar? I posted the code earlyer in this post.

The calendar code is directly copy from you tutorial so stange i doesnt work.
but im wondering if there is possible to have a button nr.1, and when clicking this a new row is added and so on.


I'm sure this can be done with a form using ajax, take a look at the solution cheesypoof provided me in this post http://www.couchcms.com/forum/viewtopic.php?f=4&t=8137.
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
New problem regarding RELATIONS!

I have made some kind of private messages system but having some trouble displaying some values.

i have
<cms:editable type='relation' name='users' masterpage='users/index.php' has='one' />
to make relations to users!

On my view page i have

<cms:pages masterpage='users/index.php' id=id >
<cms:if k_is_page >
<cms:reverse_related_pages 'users' masterpage='users/nor/outbox-employee.php' >
<div class="mail_list">
<div class="left">
<i class="fa fa-circle"></i> <i class="fa fa-edit"></i>
</div>
<div class="right">
<h3><cms:show k_page_title /> <small><cms:date k_page_modification_date format='d.m.Y H:i' /></small></h3>
<p><cms:show desc /></p>
</div>
</div>
</cms:reverse_related_pages>
</cms:if>
</cms:pages>

The BOLD code is today showing the page title, but i wanna show the USERS name from relation. How can this be possible?
The k_is_page check is redundant as pages fetched by <cms:pages> will always show this as true.
So after removing that check, we are essentially left with the following -
Code: Select all
<cms:pages masterpage='users/index.php' id=id >
    <cms:reverse_related_pages 'users' masterpage='users/nor/outbox-employee.php' >
        <cms:show k_page_title />
        ..
    </cms:reverse_related_pages>
</cms:pages>

Since the <cms:show k_page_title /> is being used within the inner <cms:reverse_related_pages> block, it will override the variable with the same name set by the outer <cms:pages> block.

To use the variable set by the outer block, we can save it into another variable as follows -
Code: Select all
<cms:pages masterpage='users/index.php' id=id >

    <cms:set my_user_name = k_page_title />
   
    <cms:reverse_related_pages 'users' masterpage='users/nor/outbox-employee.php' >
        <cms:show my_user_name />
        <cms:show k_page_title />
        ..
    </cms:reverse_related_pages>
</cms:pages

An now you should be able to display values from both the blocks without the immer overriding the outer as the names are different.

Hope it helps.
KK wrote: The k_is_page check is redundant as pages fetched by <cms:pages> will always show this as true.
So after removing that check, we are essentially left with the following -
Code: Select all
<cms:pages masterpage='users/index.php' id=id >
    <cms:reverse_related_pages 'users' masterpage='users/nor/outbox-employee.php' >
        <cms:show k_page_title />
        ..
    </cms:reverse_related_pages>
</cms:pages>

Since the <cms:show k_page_title /> is being used within the inner <cms:reverse_related_pages> block, it will override the variable with the same name set by the outer <cms:pages> block.

To use the variable set by the outer block, we can save it into another variable as follows -
Code: Select all
<cms:pages masterpage='users/index.php' id=id >

    <cms:set my_user_name = k_page_title />
   
    <cms:reverse_related_pages 'users' masterpage='users/nor/outbox-employee.php' >
        <cms:show my_user_name />
        <cms:show k_page_title />
        ..
    </cms:reverse_related_pages>
</cms:pages

An now you should be able to display values from both the blocks without the immer overriding the outer as the names are different.

Hope it helps.


Thanks Alot KK, that helped me alot :)
Question regarding LIST UNPUBLISHED pages

How can i show all unpublished pages in a list?

Is this possible!
kimheggen wrote: Question regarding LIST UNPUBLISHED pages

How can i show all unpublished pages in a list?

Is this possible!


Use the filter parameter and filter pages with the k_publish_date of '0000-00-00 00:00:00' (if you google for couchcms unpublished pages you'll find more info). All unpublished pages have their dates set as to 00's and you also must have show_future_entries=1 in the pages.
Image
Bartonsweb wrote:
kimheggen wrote: Question regarding LIST UNPUBLISHED pages

How can i show all unpublished pages in a list?

Is this possible!


Use the filter parameter and filter pages with the k_publish_date of '0000-00-00 00:00:00' (if you google for couchcms unpublished pages you'll find more info). All unpublished pages have their dates set as to 00's and you also must have show_future_entries=1 in the pages.


Hi, Sorry but i forgott to say that i wanna LIST UNPUBLISHED PAGES in front end. Is this possible?
Is it possible to have a button DOWNLOAD and when clicking this button you download ALL files saved to the folder?

Example: I have folder 2016 and i list all CHILD folders. But in all the child folders i have about 30 users and all of them uploads 2-4 documents so to download ONE and ONE takes just a long time. So i want to be able to DOWNLOAD all files saved to one child folder!

Hoping there is some solution for this!
kimheggen wrote:
Bartonsweb wrote:
kimheggen wrote: Question regarding LIST UNPUBLISHED pages

How can i show all unpublished pages in a list?

Is this possible!


Use the filter parameter and filter pages with the k_publish_date of '0000-00-00 00:00:00' (if you google for couchcms unpublished pages you'll find more info). All unpublished pages have their dates set as to 00's and you also must have show_future_entries=1 in the pages.


Hi, Sorry but i forgott to say that i wanna LIST UNPUBLISHED PAGES in front end. Is this possible?


I'm uncertain as have never tested, but try putting <cms:pages> parameters - start_on to "0000-00-00" and stop_before to "0001-00-00" and this should list unpublished pages, I think(?). Please try it and see.
Image
Previous 1, 2, 3, 4, 5, 6, 7 Next
70 posts Page 3 of 7
cron