Technical support This forum is closed.
Version 1.x > Technical support > Dynamic articles View modes: 
User avatar
Member
Member
Antony - 12/22/2005 2:19:32 PM
   
Dynamic articles
Hello!

I need to create a template with dynamic part.

For example, I have a set of 10 articles.
There is CMSViewer in template.
So, I need to be able to choose an article to be displayed, only one at the same time.

Is it possible to do this with cmsdesc? I mean without remake of template.

User avatar
Member
Member
Antony - 12/22/2005 3:09:12 PM
   
Re: Dynamic articles
I set up CMSViewer as follows:

RelatedNodesIsOnTheLeftSide = true
RelationshipName = Testing
RelationshipWithNodeId = 20 (this is the id of Home page)
SelectNodesClassName = cms.article
SelectNodesPath = /% (articles reside in the root directory)
ViewMode = MultipleItems

Also, there is relationship between Home page and Article1.

But in this case, article1 is displayed in all pages have the same template as Home.
It is strange because, I pointed to Home page ID, and only Home page has relationship 'Testing'.

Well, if I drop RelationshipWithNodeId to 0, I see that all articles are displayed in all pages.

And also, I don't understand why is RelationshipWithNodeId needed?

User avatar
Guest
admin - 12/27/2005 3:58:13 PM
   
Re: Dynamic articles
Hi Antony,

I'm not sure if I understand what you're trying to achieve. Could you please write me the tree structure of your documents? Do you need to display documents that are placed under the current page or do you need to display documents that have some relationship with the Home page?

Thank you.

Best Regards,

User avatar
Member
Member
Antony - 12/29/2005 1:08:30 PM
   
Re: Dynamic articles
Well, every page does have three places for articles.
Of course, each place has to be filled in with an article.

So, since I have ten (may be more) articles,
I need to be able to choose an article for every place on each page.
It seems, this can be achieved with using of relationships.

Example,

this is a page:
+----------------------+
|
|
|
|
+----+--------+------+
| left | center | right |
+----+--------+------+

left, centre and right are the names of CMSViewer.

I want to display article1, article2 and article3 on my Home page and
article1, article5, article7 on my Products page.

Well, it would be nice if I can assign articles for CMSViewer through the web interface,
I mean, without any additional coding.

User avatar
Member
Member
Antony - 12/29/2005 1:12:44 PM
   
Re: Dynamic articles
Also,
I can not store articles under some document,
because the same article can be displayed in different pages.

May be relationships is the solution... I really don't know.

User avatar
Guest
admin - 12/30/2005 8:24:28 PM
   
Re: Dynamic articles
Hi Antony,

how will the user select where some particular article should be displayed? Or will this be ensured by some application logic, that will select the appropriate articles?

Regards,