Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

UserKey with '-'
minhsangd
#1 Posted : Tuesday, November 29, 2011 9:11:46 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 3/16/2011(UTC)
Posts: 67
Location: vietnam
when i install Kooboo, there are several Article Records and their user have format with '-'
but when i add one more Article and the Userkey is NVT2TXPMCEKZNPM8 not like "my-post" as expected... (my title is: my post)
and when i change title, the userkey not change
for example:
the article: Lorem ipsum dolor sit-amet
the userky: Lorem-ipsum-dolor-sit-amet
when i change title to: my post 2
the userkey still: Lorem-ipsum-dolor-sit-amet
i figured out:
- when using Add Content Form, the user will be title with dashed (remove space)
but when add content in kooboo cms, database, the userkey will be like this: NVT2TXPMCEKZNPM8
i want the userkey with '-' when i add content in kooboo database, what should i do?
jifeng
#2 Posted : Wednesday, November 30, 2011 7:40:09 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China

1. Is the "Title" field set as "Summary field" in the content type, it is required when it want to be used as userkey.

2. The userkey is a primary key, it can not be changed when the title was changed. But the user can edit it manually, you just need to create a field named "UserKey" in the content type.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
1 user thanked jifeng for this useful post.
minhsangd on 12/1/2011(UTC)
sbrickey
#3 Posted : Friday, December 16, 2011 12:44:22 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 12/16/2011(UTC)
Posts: 35
Location: Ohio, USA
So I found that I wanted to change the UserKey as well... used the Helper.Edit(obj, "UserKey") in one of the views... I assume it won't break anything (except links to the old URL).

On a different note, I have found a use for the UserKey to be unrelated to content (either autoincrementing integer, or GUID)... was curious if you've considered adding several UserKeyGenerator implementations, and being able to choose which one, for each content type.

Finally, regarding the default/current UserKeyGenerator... any chance that a setting could be applied (perhaps at the content type level?) to allow automatic updating (such as the original post)?

Thanks,
-Scott
jifeng
#4 Posted : Monday, December 19, 2011 1:58:14 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
UserKeyGenerator is a singleton object, but you can change the implementation according to the content schema name.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.066 seconds.