Author variables?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
dirtywhitellama

Author variables?

Post 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!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Author variables?

Post 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
dirtywhitellama

Re: Author variables?

Post by dirtywhitellama »

No, on the pages themselves. (I added an Author content block to my template)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Author variables?

Post 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
dirtywhitellama

Re: Author variables?

Post 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.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Author variables?

Post 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>
Locked

Return to “Layout and Design (CSS & HTML)”