Forum

 

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
I need a class for services for styling.
25 January, 2010
2:40 am
garyh357
Member
Forum Posts: 7
Member Since:
24 January, 2010
Offline

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?

25 January, 2010
3:20 am
Ben Miller
Moderator
Forum Posts: 383
Member Since:
18 June, 2009
Offline

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
27 January, 2010
3:11 am
garyh357
Member
Forum Posts: 7
Member Since:
24 January, 2010
Offline

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

9 February, 2010
4:53 pm
garyh357
Member
Forum Posts: 7
Member Since:
24 January, 2010
Offline

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

11 February, 2010
12:55 am
mvejvoda
Enthusiast
Forum Posts: 15
Member Since:
9 February, 2010
Offline

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

21 February, 2010
7:19 am
garyh357
Member
Forum Posts: 7
Member Since:
24 January, 2010
Offline

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.

21 February, 2010
7:24 am
garyh357
Member
Forum Posts: 7
Member Since:
24 January, 2010
Offline

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

22 February, 2010
4:05 am
Ben Miller
Moderator
Forum Posts: 383
Member Since:
18 June, 2009
Offline

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
Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online: 0be1
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

malpan - 2453

jogen - 2440

VanWatterson - 652

GeraldSebring - 364

LucasWoltman - 362

RandellFeenstra - 362

Member Stats:

There have been 7 guest posters

There are 1936 members

There are 1 moderators

There are 1 admins

Forum Stats:

Groups: 1

Forums: 2

Topics: 971

Posts: 3747

Newest Members: twinton, ellison13579, Daigh, mchunful, jesua, LGRG Design

Moderators: Ben Miller (383 )

Administrators: Mark Barnes (425)

 

Comments are closed.