OXID Community Forum

> International Forums > Newbies > change DB-field to display in editor of article_main
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: change DB-field to display in editor of article_main


Reply
 
Thread Tools Display Modes
#Top   #1  
Old 04-23-2012, 06:51 PM
spierala spierala is offline
Member
Join Date: Nov 2011
Posts: 58
spierala is on a distinguished road
Default change DB-field to display in editor of article_main

Hello all,
how can I change the Database field that is displayed in the editor of article_main?
I think I have found the correct code of line in in article_main.php:

Code:
$this->_aViewData["editor"] = $this->_generateTextEditor( "100%", 300, $oArticle, "oxarticles__oxlongdesc", "details.tpl.css");
The field "beschreibung" of the table oxarticles should be displayed.
But if I just change oxarticles__oxlongdesc to oxarticles__beschreibung it does not work.

Many thx in advance,
Florian
Reply With Quote
#Top   #2  
Old 04-24-2012, 01:21 PM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is online now
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,090
Marco Steinhaeuser is on a distinguished road
Default Re: change DB-field to display in editor of article_main

Hello Florian,

I don't know a field called "beschreibung" in oxarticles. Actually "beschreibung" is the German translation of oxlongdesc

Regards
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #3  
Old 04-24-2012, 01:52 PM
spierala spierala is offline
Member
Join Date: Nov 2011
Posts: 58
spierala is on a distinguished road
Default Re: change DB-field to display in editor of article_main

Hello Marco,
I should have mentioned "beschreibung" is a field that I added myself to the table oxarticles.
Regards,
Florian
Reply With Quote
#Top   #4  
Old 04-24-2012, 11:03 PM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is online now
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,090
Marco Steinhaeuser is on a distinguished road
Default Re: change DB-field to display in editor of article_main

you probably have to write a getter. know what it is?

cheers
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #5  
Old 04-24-2012, 11:08 PM
vanilla thunder's Avatar
vanilla thunder vanilla thunder is online now
Senior Member
Join Date: Nov 2010
Posts: 3,223
vanilla thunder is on a distinguished road
Default Re: change DB-field to display in editor of article_main

nooo you don't need a getter, cause oxid has a lazy loader: $oArticle->oxarticles__beschreibung will get the value of your field. But you need to update Views
Reply With Quote
#Top   #6  
Old 04-24-2012, 11:10 PM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is online now
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,090
Marco Steinhaeuser is on a distinguished road
Default Re: change DB-field to display in editor of article_main

Quote:
Originally Posted by vanilla thunder View Post
nooo you don't need a getter, cause oxid has a lazy loader: $oArticle->oxarticles__beschreibung will get the value of your field. But you need to update Views
Magic, innit? :-)
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #7  
Old 04-24-2012, 11:13 PM
vanilla thunder's Avatar
vanilla thunder vanilla thunder is online now
Senior Member
Join Date: Nov 2010
Posts: 3,223
vanilla thunder is on a distinguished road
Default Re: change DB-field to display in editor of article_main

sometimes
Reply With Quote
#Top   #8  
Old 04-25-2012, 08:59 AM
spierala spierala is offline
Member
Join Date: Nov 2011
Posts: 58
spierala is on a distinguished road
Default Re: change DB-field to display in editor of article_main

Hello all,
it is really strange...

just an example:
If put that line in the render function of article_main.php:
Code:
$this->_aViewData["editor"] = $this->_generateTextEditor( "100%", 300, $oArticle, "oxarticles__oxlongdesc_1", "details.tpl.css");
the editor won´t even display the the field oxlongdesc_1.
I updated the view and cleared the tmp folder.

Then it seems that I also had to update the save function...
I think I have to change that line in the save function to something else :
Code:
$oArticle->setArticleLongDesc( $this->_processLongDesc( $aParams['oxarticles__oxlongdesc'] ) );
many thanks,
Florian
Reply With Quote
Reply

Bookmarks

Tags
articlemain, change, dbfield, display, editor

« Previous Thread | Next Thread »
Thread Tools
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add field to oxarticles table spierala Newbies 4 10-23-2012 08:50 AM
How create a Select Field (multiple) in Admin (article_main) spierala Newbies 4 01-25-2012 11:24 AM
Oxtags Field Sean Templates and Design 3 05-24-2011 06:18 PM
add custom field - parse html?! scuba303 Developers 1 12-01-2010 12:34 AM
article_main.tpl marcus d Templates und Design 3 10-12-2010 05:19 PM

All times are GMT +1. The time now is 04:38 AM.