Closed GoogleCodeExporter closed 9 years ago
I think this can be implemented as page's custom attributes with i18n support.
1. Add custom attributes for page and all children.
2. Attribute should be localized.
3. Attribute type will be string
4. Access to the page's attributes from Velocity: $page.attribute.tag_line
Original comment by kinyelo@gmail.com
on 25 Sep 2010 at 9:09
Issue 340 has been merged into this issue.
Original comment by kinyelo@gmail.com
on 25 Sep 2010 at 9:14
where can I see and how to use this feature??
Original comment by angelome...@gmail.com
on 26 Sep 2010 at 10:57
This feature will be developed.
Original comment by kinyelo@gmail.com
on 26 Sep 2010 at 12:27
Original comment by kinyelo@gmail.com
on 26 Sep 2010 at 12:28
what do you suggest to implement and when it will be available. And also how we
will going to use it if we have a tons of pages?
Original comment by angelome...@gmail.com
on 28 Sep 2010 at 4:52
Custom attributes implementation details:
1. Every page will have new tab "Attributes"
2. On this tab user can add attribute specifing name and "Apply to children"
flag.
3. After adding user can provide attribute value
4. Attribute will be multilingual so every value will be binded to language
5. If "Apply to children" flag specified then all children pages will have this
attribute. And users can provide it's values. But user will not be able to
delete inherited attributes.
6. Accessing page attributes from Velocity:
$page.attribute.ATTR_NAME - will give the attribute value for current language
If attribute value for this language doesn't exists then it will take value for
default language.
7. If user don't need multilingual attribute then he will fill value for
default language.
8. Defined attributes will be stored in table AttributeEntity and attribute
values for pages will be stored as JSON string property page.attributes.
PageEntity will have special property with parsed attributes page.attribute
Original comment by kinyelo@gmail.com
on 28 Sep 2010 at 6:40
Just for usability this will create a lot of extra work for content managers.
change from tab to tab takes some time to load. Also what if a page attribute
is not set?
I think having just one field in the page content would be better. Maybe even
add an attribute within global config settings would be the best solution.
I.e. "Use SEO Title" yes / no. if yes selected than within page.content tab
this field is displayed.
Original comment by dominiqu...@gmail.com
on 2 Oct 2010 at 2:20
For automate attribute settings we can add checkbox "apply to all children"
during setting attribute value.
The custom page attributes usage can be wider then just SEO titles.
Actually you can implement SEO titles now using structures by creating a
structure with 2 fields: seo_url, content.
Original comment by kinyelo@gmail.com
on 2 Oct 2010 at 7:07
Will the page attributes be available to the templates?
If so, it would provide a way to customize templates for different parts of the
site.
Right now, we have several copies of the template for the Vosao CMS docs,
because we change the left column in each section.
If page attributes are available to templates, then we could do something like
$service.findContent($page.attribute.sidebar)
and push the sidebar content out into include files, as we do for the header
and footer.
Developer!page.attribute.sidebar = /inc/sidebar-developer
Designer!page.attribute.sidebar = /inc/sidebar-designer
Would a PAGE attribute set on the home/root page have the same affect as a SITE
attribute?
-Ted.
Original comment by ted.husted
on 25 Nov 2010 at 4:47
Page attributes will be available everywhere you can access $page variable. In
the templates, structural templates, etc.
Original comment by kinyelo@gmail.com
on 25 Nov 2010 at 6:27
Yes page attribute set on the root page will have the same effect as a site
attribute.
Original comment by kinyelo@gmail.com
on 25 Nov 2010 at 6:33
Implemented.
Original comment by kinyelo@gmail.com
on 25 Nov 2010 at 8:44
(1) As implemented on staging now, is "inherited" the apply-to-children feature
indicated in comment 7? It looks like we started to change the label in r929,
but did not add "page.apply-to-children" to the message bundles, and so the
label (or the field) is not being presented on edit. It may be intentional, but
we also seem to be setting "inherited" on create, but updating "attrInherited"
on edit in attributes.vm. This also may be by design, but if inherited is not
selected at first, it cannot be changed later.
(2) When saving a page attribute for the first time, the system asks about a
default value, and then sets a language field that is NOT shown when creating
the attribute. It looks like we started by referring to title, and then
switched to "language" instead of "title" (in r926, compare attributes.vm, rows
66 and 82).
(3) Regarding comment 11, is $page.attribute being exposed to templates. Right
now, a reference seems to return "Approved content not found". See
http://staging.vosao.org/test/page-attributes
Original comment by ted.husted
on 5 Dec 2010 at 11:26
(1,2) There are two different actions and windows:
- one for defining page attribute where we define attribute title, name,
inheritance
- another for setting attribute value where we set attribute value for selected
language and can apply this value for all child pages (if attribute inheritance
enabled).
(3) Fixed.
Original comment by kinyelo@gmail.com
on 5 Dec 2010 at 2:44
Steps to reproduce
* Set an attribute on a page with children and include a value
* Select "inherited" and Save
Current behavior
* System indicates that the attribute has no value and offers to use the
default value
* Selecting Apply to children and OK sets value to parent
* Child pages are provided attribute but not the default value
* When editing the attribute on a child page, the system offer to set it to the
default value, and does so correctly
Expected behavior
* System will accept attribute name and other properties in one step
* Child pages (and their children) will inherit the default value automatically
* Ideally, if an inherited page attribute is not edited, and the parent is
changed, the change will cascade to children using the default value.
Screen shots of current behavior attached
Original comment by ted.husted
on 26 Dec 2010 at 1:15
Attachments:
Original comment by ted.husted
on 26 Dec 2010 at 1:16
This issue was closed by revision r985.
Original comment by kinyelo@gmail.com
on 20 Jan 2011 at 9:07
Original issue reported on code.google.com by
angelome...@gmail.com
on 22 Sep 2010 at 2:38