Retrieving a page's author

1 view
Skip to first unread message

Clarke Bishop

unread,
Mar 4, 2010, 10:49:21 AM3/4/10
to spla...@googlegroups.com

Splash provides the page object in request.page. But, the author information is not automatically retrieved from the database. I have some layouts where I need to display the author.

 

I have two questions:

 

1.       Do I have to modify Viewer.cfc to retrieve the author information when request.page is originally created?

<cfset request.page = model('page').findOneBySlug(value=”#params.slug””, include=”author”)>

 

Instead of:

<cfset request.page = model('page').findOneBySlug(params.slug)>

 

I tried this and it does include an author object in request.page. But, none of the actual author information is in the author object.

 

2.       Or, does the Page object remember it’s author association, and can it retrieve the author information later.

If so, I could do request.page.someCoolFunctionCall() to get the author. Will this work, and what’s the syntax?

 

Thanks for any ideas. I admit I still haven’t fully grasped associations and models in Wheels and all the cool ways you can access the data!

 

   Clarke

Office: 770-642-1353
eMail: cbi...@resultantsys.com

 

Russ Johnson

unread,
Mar 11, 2010, 12:33:57 PM3/11/10
to spla...@googlegroups.com
Sorry I have been so slack on replying lately... was way too busy last week and this week has been pretty crazy too..

There is an author tag, although its limited right now to only outputting the name attribute of the author for the current page that its called from.. thats probably where I would start instead of adding things to viewer.cfc. Using the tags keep things uncoupled and helps with the flexibility.

Feel free to expand on the author tag to do what you need. I know it needs more functionality and admittedly havent looked at the Radiant author tags to see what they do.

- Russ

raulriera

unread,
Mar 11, 2010, 6:16:50 PM3/11/10
to Splash CMS
SplashCMS hackathon :D!!

> > eMail: cbis...@resultantsys.com

Russ Johnson

unread,
Mar 11, 2010, 8:04:12 PM3/11/10
to spla...@googlegroups.com
Ha ha nice! We need to take a day on the weekend when everyone has some time, jump on Skype and start banging out fixes and features... I have so many things I want to do with it and just not enough time, and when I do get time, I end of finding something else that needs my attention so it gets pushed off.. maybe if we set aside some hack time I would be more dedicated to doing it...

raulriera

unread,
Mar 11, 2010, 9:23:12 PM3/11/10
to Splash CMS
Im up for that!! we can start by slicing the layout :)

Russ Johnson

unread,
Mar 11, 2010, 10:04:26 PM3/11/10
to spla...@googlegroups.com
Was working on that tonight already... lol

raulriera

unread,
Mar 12, 2010, 12:08:12 AM3/12/10
to Splash CMS
Hehe then bug squashing and features it is :D

Clarke Bishop

unread,
Mar 12, 2010, 7:40:49 AM3/12/10
to spla...@googlegroups.com
Sounds great! When?

Clarke

raulriera

unread,
Mar 12, 2010, 1:21:56 PM3/12/10
to Splash CMS
I am free.. whenever you guys get a change... just let me know when

Clarke Bishop

unread,
Mar 12, 2010, 3:57:20 PM3/12/10
to spla...@googlegroups.com
It's pretty easy to schedule me, too. Russ?

Russ Johnson

unread,
Mar 12, 2010, 4:02:38 PM3/12/10
to spla...@googlegroups.com
Im usually pretty free on the weekends... this weekend is out though due to my sister-in-law and her family being in town this weekend...

Aside from that Im usually pretty open since I make my own schedule...

raulriera

unread,
Mar 12, 2010, 5:12:38 PM3/12/10
to Splash CMS
i am going to throw something here Saturday 27... all day :D

Russ Johnson

unread,
Mar 12, 2010, 5:25:08 PM3/12/10
to spla...@googlegroups.com
lol... the day of my sons 8th birthday party... ok.. im usually free with that exception ;)

raulriera

unread,
Mar 12, 2010, 8:02:44 PM3/12/10
to Splash CMS
You pick the date :P

raulriera

unread,
Mar 27, 2010, 11:32:06 PM3/27/10
to Splash CMS
Im still free for this :)
Reply all
Reply to author
Forward
0 new messages