Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1

Updating our office's website I encounterd a little problem. I'm listing projects. Those who are still ongoing have a date in the future. Displaying these in a list (as per the usual list view of the template itself) is no problem with using show_future_entries='1', of course.

1) Now, within the template globals I choose some that should be featured on a seperate page. I do this within a mosaic:
Code: Select all
<cms:mosaic name='featured_projects' label='Projekt hinzufügen'>
    <cms:tile name='featured_project' label='Projekt hinzufügen'>
        <cms:editable type='relation' name='featured_project' label='Projekt' masterpage='projects.php' has='one' order='-20'/>

            label='Project name'
            desc='laufende Projekte werden noch nicht in der Übersicht angezeigt, daher hier Projektnamen einfügen'

I get the results I want. Just in the admin panel the title of those projects who are ongoing (so with a publish date in the future) are not shown. The regular ones are fine. What am I missing?

2) Within those projects I define the teammembers who are/have been working on it, again with a relation. Every teammember has his own page with some info and the projects he/she is working/worked on.
Code: Select all
<cms:reverse_related_pages 'project_team' masterpage='projects.php' orderby='publish_date' show_future_entries='1'> 
    <cms:if k_count='1'>

    <cms:if "<cms:not_empty project_text_de />" ><a href="<cms:show k_page_link/>"></cms:if><cms:show k_page_title/><cms:if project_is_ongoing> - <i>laufend</i><cms:else/> - <cms:show project_year/></cms:if><cms:if "<cms:not_empty project_text_de />" ></a></cms:if><cms:if k_count lt k_total_records>, <br/><cms:else_if k_count=k_total_records/>.</cms:if>
    <cms:if k_count=k_total_records>

This is working as it should, but only if there is a project that has already been finished. If there is only one related page (the project), which is ongoing (so publish date in the future) no entry is displayed.

Any help would be much appreciated as I couldn't find anything in the forum on the problem, yet.

Off the top of my head, I don't see any reason for this behaviour - will need to study the issue first-hand to know exactly what seems to be happening.

Anyway, could you please try using the 'advanced' mode (viewtopic.php?f=5&t=11021) and let me know if that rectifies the first issue?
Hi Kamran,

thank you for the quick reply! But I'm not sure if the advanced gui helps unless there is then some different rendering of the item internally involved. (EDIT: there is no difference when using the advanced gui)

I attached two pictures, guess it'll help more. In "tile" I added a textfield due to explained behaviour so that I don't need to edit a tile to see it's content. "Mosaic" shows part of the list and what is happening. In the first item I selected a project which has a date in the future, second item (finished project, publish date in the past) shows regularly and has the name of the project after the dot.

So no issues yet recorded with a reverse relation of a future object? Concerning point nr 2


Thanks. Couch you please try the following? -
find the file named 'display_field_relation.html' in your installation's 'couch/addons/mosaic/theme/fields/' folder.
Edit it to add show_future_entries='1' to the following statement as shown-
Code: Select all
<cms:related_pages orderby=orderby order=order_dir show_future_entries='1'>

Please let me know if this makes any difference.
Hi Kamran,

yes, that did the trick! Thank you very much!
Thanks for the update.
I have pushed the change to GitHub.
Anything else I can do to help solving nr. 2? ;)
7 posts Page 1 of 1