Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: Tank on October 26, 2012, 20:16:53

Title: Articles and Global Settings
Post by: Tank on October 26, 2012, 20:16:53
So, I've been playing with Elxis, design, templates, and recently got to the articles.

I notice by default all articles display author, date, tags..etc. and these are handled by "Parameters" all set to *Global Settings*.
But, as a website, I know not all articles display such information.

Example autonomous pages or static/non-blog pages usually don't display author or date.
Trying to figure out where "Global Settings" is set... I figured must be inherit from categories.

So, I created new category "Information" and set the category parameters to: Hide Author and Date for all featured, link, and short articles.
Then, created a new article and put it inside "Information" category.
It's true when I click on "Information" link from front end.. the featured, link, and short articles inherit the parameter setting and hides the author and date.

However, when clicking on the article, the author and date is shown.
So, my questions... Where is the "Global Setting" for the article itself set? I can't find it... not in settings, components, or modules.  ???

Also: Wouldn't it be more useful for even the article itself to inherit the parameter settings of the category? If in categories can set global settings for articles' parameters... would be great.
=>If I create multiple articles inside Information category... I don't want to change parameter to hide author+date each time. (For example)

Thanks!
Title: Re: Articles and Global Settings
Post by: datahell on October 28, 2012, 21:35:23
Component content XML parameters are the global settings you are looking for.
Extensions -> Components -> click to edit Content -> Parameters

1st level of configuration options: Component content
2nd level of configuration options: Category
3rd level of configuration options: Article

Articles can inherit settings from categories and component content
Categories can inherit settings from component content
Autonomous pages (articles without categories) can inherit settings component content
Title: Re: Articles and Global Settings
Post by: Tank on October 29, 2012, 20:48:50
Component content XML parameters are the global settings you are looking for.
Extensions -> Components -> click to edit Content -> Parameters

1st level of configuration options: Component content
2nd level of configuration options: Category
3rd level of configuration options: Article

Articles can inherit settings from categories and component content
Categories can inherit settings from component content
Autonomous pages (articles without categories) can inherit settings component content


Thank you datahell!! That's what I was looking for. :) I saw "content" in components, never thought to look in there. I am an idiot.

Articles can inherit settings from categories and component content

One problem, I created new category "Information", and in this category parameters, I set to hide date + author.
However, when I create a new article and assign it to this category.. when I go to this article in frontend, article still shows date + author.

Maybe I am doing something else wrong?
Title: Re: Articles and Global Settings
Post by: datahell on October 29, 2012, 22:14:57
The inherit happens during content generation in frontend section, not on the edit page.
When you add a new article the parameters are reset to the default, not the category or content, but the articles default as they are on article's flat XML file.
The default, pre-selected, option is to inherit from the article's category or the component's content corresponding options.

For date and author
The default option for the articles (parameter: art_dateauthor) is "GLOBAL SETTING".
<param type="list" name="art_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description="" />

In categories there is no such option as for categories there are 3 different related options for featured, short and link articles, not for the full article.
<param type="list" name="ctg_featured_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description="" />
<param type="list" name="ctg_short_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description="" />
<param type="list" name="ctg_links_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description=" /">

So the "date and author" inherits directly from the XML parameters of component content and the default value is "automatic date and author".
<param type="list" name="art_dateauthor" default="6" label="DATE_AUTHOR" dir="rtl" description="">
   <option value="0">HIDE</option>
   <option value="1">CREATED_DATE</option>
   <option value="2">CREATED_DATE_AUTHOR</option>
   <option value="3">MODIFIED_DATE</option>
   <option value="4">MODIFIED_DATE_AUTHOR</option>
   <option value="5">AUTO_DATE</option>
   <option value="6">AUTO_DATE_AUTHOR</option>
</param>
Title: Re: Articles and Global Settings
Post by: Tank on October 30, 2012, 01:56:21
In categories there is no such option as for categories there are 3 different related options for featured, short and link articles, not for the full article.
<param type="list" name="ctg_featured_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description="" />
<param type="list" name="ctg_short_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description="" />
<param type="list" name="ctg_links_dateauthor" default="-1" label="DATE_AUTHOR" dir="rtl" description=" /">



I see. Currently featured, short, and link articles have ability to inherit category parameters.
So, I would like to request if Elx team will consider adding article (the article itself) parameters to category so that full articles in frontend will inherit settings from category also and not only the featured/short/links. :)
I think users will find this useful.

Because right now, as I play with Nautilus and create articles... I am finding myself having to choose "Hide" date + author and hits, on every article I create within the "Information" category.
Of course, for "blog" category, I will like to display author + date, so setting component parameters for article to "Hide" author + date would mean that for every blog entry I will have to choose "Show" author + date.
So, having the individual full articles to inherit from category will be quite useful if possible. As always all time for your replies and consideration is appreciated. :)))

I hope there's no misunderstanding  ;D
Title: Re: Articles and Global Settings
Post by: datahell on October 30, 2012, 14:31:27
Elements can inherit settings from same elements. Featured/Short/Link articles are not full articles.
Category page is not article's page.
Use the component's option for inheritance.