Setting the frontpage "field"?

kaiman 13 Oct, 2011
Hi,

Customizing the submitcontent.cfbak form I'm now close to a simpler frontpage only article submission form for my users. It's really simple, just having fields for Title, Published (Yes/No) and Content (body).

I have one last problem, however. I want to programmatically set the "Frontpage" field to "Yes". This was not as easy as I thought, or maybe I'm overlooking the obvious?

In the "On Submit code - after sending email:"-section I'm setting some of the other hardcoded variables, but as I understand it the data for wether an article is displayed on the frontpage resides seperately in another table in the DB (_content_frontpage).

Is there a known method for programmatically setting an article to be displayed on the frontpage?
I have searched high and low for an answer to this, but found nada so far.. Greatful for any hints! :-)
kaiman 29 Oct, 2011
I'm sorry if I'm nagging, but I'm still no closer to a solution to this. Is this a very uncommon thing to try to accomplish?
Maybe my approach is all wrong and I should try to look at this in a new way.

Does anyone know of an extension that does this, maybe? Present the author with a simplified "New article" form where an admin can decide what fields are displayed and their default values?

The submitcontent.cfbak form is so close to what I need, but I have to ask for alternatives as long as I can't find a way of setting the "Show on frontpage" option programmatically.

And again; I really appreciate all thoughts comments on this subject! 🙂
GreyHead 29 Oct, 2011
Hi Kaiman,

I don't remember the front-page question being asked here before so I guess it's not common.

I think you need to get the ID of the new article and write query to add a record to the #__content_frontpage table as you suggest.

Bob
kaiman 29 Oct, 2011
Thanks for answering. At least now I know that it is'nt any quick'n'easy solution to this that I'm overseeing.🙂

I'll give it a try and leave a word here how (if) it works out.
This topic is locked and no more replies can be posted.