Page 1 of 1

Author variables?

Posted: Wed Apr 05, 2006 10:00 pm
by dirtywhitellama
My idea is this:

I'd like to set it up so that every article by a certain person has a link to a page about them.  (These articles are not necessarily posted by the author)  It would also be nice to have a reciprocal link to the articles  by a given author but that's a seperate question (I think).

Would it be possible to create a variable or somesuch so that when someone posts an article by someone, for example Mark F., they can put in the author content box something simple like {markf},  and the result on the page will be:
Author: Mark F. 

(assume the underline is a link)


I could do it with global content blocks (assuming they work in content boxes on pages)  but it would be more convenient to have a shorter tag for my editors to put in since they are not all computer savvy.

Thanks for your help!

Re: Author variables?

Posted: Thu Apr 06, 2006 12:13 am
by Dr.CSS
I'd like to set it up so that every article by a certain person has a link to a page about them.  (These articles are not necessarily posted by the author)
is this using the news module?

  mark

Re: Author variables?

Posted: Thu Apr 06, 2006 2:41 am
by dirtywhitellama
No, on the pages themselves. (I added an Author content block to my template)

Re: Author variables?

Posted: Thu Apr 06, 2006 4:35 am
by Dr.CSS
Got a link?
the only way i know how is to make a link in the edit/content page when they type the name ,,
unless you do something in the template like

  Author: {content ="author"}
this *** would have to be a tag to a page.

  mark

Re: Author variables?

Posted: Thu Apr 06, 2006 5:10 am
by dirtywhitellama
oh well, no big deal. Do global content blocks work inserted into the content fields?  I'm writing a tutorial on adding content anyways and I could always just have them copy and paste.

Re: Author variables?

Posted: Thu Apr 06, 2006 11:51 am
by tsw
You can also use user-defned tags..

create new tag named author (or something like that)

Code: Select all

global $gCms;
echo $gCms->variables['username'];
then you can use it like

Code: Select all

<a href="/{author}.html">Author: {author}</a>