Forum

You must be logged in to post Login Register

Search Forums:


 






I need a class for services for styling.

How do I?
UserPost

2:40 am
25 January, 2010


garyh357

Member

posts 7

Is there a template tag not listed, or some other way that I can dynamically add a class to the results page listings based on services, series, preachers or other? I'm looking for something like

or
or similar. Is it possible? Can it be possible?

3:20 am
25 January, 2010


Ben Miller

Appleton, WI, USA

Guru

posts 181

For those of you who are wondering, he's looking for something like:

<div class="service-1"> or
<div class="service-sunday-morning">

I'm not aware of any template tag that would do this, but it sounds like a neat idea to me.

Ben Miller
Pathways Church, Appleton, WI, USA

3:11 am
27 January, 2010


garyh357

Member

posts 7

Sorry, I guess I failed to put my code in a code wrapper. Thanks for catching that Ben.

That's exactly what I'm looking for. It'll allow me to style the Sunday Morning sermons differently from Sunday Evening or if the same were true with series and preacher, then I could style it to show the preacher's pic or a different styling for particular series. The limits could be endless. What I'd really like to see is…

<div class="service-1 series-1 preacher-1 book-1"> or <div class="service-sunday-morning series-in-the-beginning preacher-john-doe book-genesis">

Thanks,
Gary

4:53 pm
9 February, 2010


garyh357

Member

posts 7

Any thoughts on this? I know it's possible if the plugin core is edited, but I don't know what to change. If you know how, please reply or pm me regarding this. I need it really bad.

Thanks,
Gary

12:55 am
11 February, 2010


mvejvoda

Prince George, BC Canada

Enthusiast

posts 15

Post edited 12:56 am – 11 February, 2010 by mvejvoda


Could you not do that by editing the Search Results page template?

Use the [series] shorthand as part of the classname like:

series_[series]

would output (if evening was an id of 6 in the database):

series_6

then you name the class in the css series_6 and voila.

something like:

<table class="sermons" border="1">
[sermons_loop]
<tr>
<td>

<table class="series_[series]">
<tr>

<td class="sermon-title"><span class="files">[files_loop][file][/files_loop]</span> [embed_loop][/embed_loop] [sermon_title]
</td>
</tr>
<tr>
<td class="files"><span class="preacher">Preached by [preacher_link] on [date]. [editlink]
</span>
</td>
</tr>
</table>
</td>
</tr>
[/sermons_loop]
</table>

Thanks

7:19 am
21 February, 2010


garyh357

Member

posts 7

Well, I guess, if that's a real template tag. According to http://www.4-14.org.uk/wordpre…..plate-tags, it's not. The closest thing is [series_link] which creates a link.

If that is a real template tag, where can I find the most up-to-date list of template tags? There's other things I want to do and that would help a lot.

7:24 am
21 February, 2010


garyh357

Member

posts 7

Just tried adding the class like service-[service] and it doesn't work.

4:05 am
22 February, 2010


Ben Miller

Appleton, WI, USA

Guru

posts 181

Post edited 4:05 am – 22 February, 2010 by Ben Miller


Gary, the documentation on the website is a bit behind from the actual software. To know for sure which template tags exist, you can find them in the dictionary.php file, which is part of the Sermon Browser plugin.

Having said that, it does not look like [series] or [service] are template tags. It is possible to add new template tags to dictionary.php, with a little bit of programming knowledge.

Keep in mind that if you make any changes to dictionary.php, you need to go to Sermons, Templates, and click the Save button at the bottom to reload the new changes.

Ben Miller
Pathways Church, Appleton, WI, USA


About the 4:14 evangelical christian theology blog forum

Most Users Ever Online:

19


Forum Stats:

Groups: 1

Forums: 6

Topics: 544

Posts: 2106




Popularity: 37% [?]