Forum Activity for @adolygwr

Ceri
@adolygwr
20 Aug 2019 05:18:52PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

Got it!!!! :) Many thanks....it seems I misread Michael's post above and was in the wrong template. It was indeed item_category_index.tpl :)
Ceri
@adolygwr
19 Aug 2019 07:46:27PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

Great....many thanks :) Looking forward to playing with this :)
Ceri
@adolygwr
19 Aug 2019 05:26:27PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

The only $_Post variable I can find in that template is this one:-

{$_post}
Array (6)
_uri => "/americymru/documentation/adjectives"
module_url => "americymru"
module => "jrDocs"
option => "adjectives"
_1 => "adjectives"
_profile_id => "42"

So I tried :-

{if($_post['/americymru/documentation/adjectives'] == 'adjectives')}
blah blah
{/if}


But nothing happened. On a side note it seems that I cannot remove the text 'learning about debug' even though I took the debug code out of the template?
Ceri
@adolygwr
17 Aug 2019 06:06:21PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

That would be my preferred method. Will post later after my next attempt :)
Ceri
@adolygwr
17 Aug 2019 05:07:37PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

Many thanks....will try again and remember to run in dev mode this time :) On a side (but related) issue, I have realised that I can include a general note at the top of that page by simply adding a non alphabetic entry at the top of the list ( see:- https://americymru.net/americymru/documentation/adjectives ). BUT is there any way that I can introduce html into the title field? I would like (if poss) to put a few hr's around ANSODDEIRIAU CYMRAEG - WELSH ADJECTIVES FAQ
updated by @adolygwr: 17 Aug 2019 05:07:55PM
Ceri
@adolygwr
15 Aug 2019 12:10:23PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

It looks like it should be item_index.tpl but when I add the debug code to that template nothing happens?
Ceri
@adolygwr
15 Aug 2019 09:36:14AM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

Yeah I turned it off before I went to bed last night BUT it's on again now. Is it possible to identify the template in question?
Ceri
@adolygwr
14 Aug 2019 06:47:05PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

I must be missing something. I ran "Template Name in Source" and it appears that the template I'm after is item_index.tpl BUT just to be sure I put the code in a couple of other likely candidates as well with no result. Where on the template page does the code go? Or doesn't it matter?
updated by @adolygwr: 14 Aug 2019 06:47:26PM
Ceri
@adolygwr
14 Aug 2019 06:16:45PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

I am assuming that the template I need is the item_index.tpl in the Doc mod. How do I get debug to display as it does in your video? I added the code in several places in the template but nothing happened??
Ceri
@adolygwr
14 Aug 2019 05:25:49PM
334 posts

If/Else Loops in Templates: Question


Using Jamroom

I want to put a small text area on this page :- https://americymru.net/americymru/documentation/adjectives , above the (endless) list of adjectives on the page. Can this be done by inserting the required content in the appropriate template with an if/else loop? I know this can be done in order to change the appearance of a module. Indeed I have already done this in the Doc mod. What I am wondering is this:- will this work for an individual url? Can I construct an if/else loop in the template which will put my text (graphics, links etc) on this url and this url alone?
updated by @adolygwr: 14 Aug 2019 05:26:43PM
1