I am trying to use the seb_html template to (hopefully) generate clean markup. what little I see in documentation suggests that I should simply be able to add my Markup to the HTML field in Template option of the Content view. I can add HTML, but when I attempt to add Seblod variables like as found in the v2 documentation .
I've tried several ways to do this and I am stymied. What I am I doing wrong?
It s true, i make a mistake, sorry it's not getField but getValue.
And yes, others work! How?
getTypo, only if you use a typo plug-in on your field ( bouton 3 ).
getText, only if you use something like that inside a radio button : mytext=myvalue.
getHtml is the samething of renderField without the markup.
The renderField is the markup. Inside the markup, you have the getLabel and the getValue like that :
// The markup around each field (label+value/form) can be Overridden. // Remove the underscore [_] from the Filename. (filename = markup.php) // Edit the function name: // - fields/markup.php => cckMarkup_[template] // - fields/[contenttype]/markup.php => cckMarkup_[template]_[contenttype] // - fields/[searchtype]/markup.php => cckMarkup_[template]_[searchtype] // Write your Custom Markup code. (see default markup below)
Same here. Can't get the template to work. But my output is different - it is just the chunk of the text of php code ("<?php" gets cut off and the rest is shown). Could someone please post a working example of the code to put in the html template?
Thanks, Randy. Good question but yes, I tried that and works like a charm. Was really hoping I could use renderField as that pulls in the Typo settings as well. In most cases I can easily work with just the value and add HTML code to come up with the rendition I'm after but there are a couple cases where I'd rather rely on the Seblod typo (e.g. image lightbox).
Just curious why renderField, which works beautifully in position override won't work in the HTML template (which is Seblod's product)?
since making my suggestion about renderField above, I've learned a lot about Seblod. By combining any of the existing get functions, one should be able to achieve pretty much anything with the HTML template. You can use
getValue, getTypo, getLink, getHtml (look around the website what each of these do)
The only thing I haven't figured out is how to use PHP directly in the HTML template for conditional styling and other reasons where the Code Pack field won't do (or not easily at least). Position override is the way to go in that case, which is obviously less convenient as the HTML template is right there in the content type screen/UI.