Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • brentwilliams2 Friend
    #187535

    I am looking to create a custom layout, and I’m having problems with some of the fields.

    1) I am using the $item->city; to show the city field. This works fine. But this format doesn’t work for location or category, which show the number in the database rather than the location name or category name. How to I reference those fields properly?

    2) For the job_detail field, it is showing the raw html code, rather than the rendered code. How do I reference this field so it shows up properly?

    Thanks!

    HeR0 Friend
    #492937

    Dear,

    1. Because the category and location are multiple select field type. You should reference how to display them in the file componentscom_jajobboardviewsjajobstmplthemesinlinejalist-item.php

    2. I’m afraid that I’m not so clear with this: “it is showing the raw html code, rather than the rendered code”

    Regards

    brentwilliams2 Friend
    #493000

    Hi Hero,
    That helped! I wrote a little tutorial so that others can customize, and I think it would be a great addition to the wiki: http://www.joomlart.com/forums/topic/how-to-customize-the-job-viewtemplate-jaview-php/

    However, I do not know how to reference:

    1) job_type

    2) job_detail – With this one, I tried the following code:

    <?php $item->job_detail = strip_tags($item->job_detail); ?>
    <?php JFilterOutput::objectHTMLSafe($item, ENT_QUOTES, 'effected_date'); ?>
    <?php echo $item->job_detail; ?>

    But the output showed up like this:

    <blockquote><table style=”color: #000000 font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;” width=”100%” border=”0″ cellspacing=”0″ cellpadding=”2″> <tbody> <tr> <td style=”font-size: 11px; text-shadow: none; word-spacing: normal;” colspan=”2″> <h1 style=”font-size: 13px;”></blockquote>

    Can you help with those two fields?

    HeR0 Friend
    #493051

    Dear Brentwilliams,

    We really appreciate your sharing the solutions/ customizations/ ideas related to our products and community.

    Regarding your question, pls try to remove the following lines of code to get it fixed.

    <?php JFilterOutput::objectHTMLSafe($item, ENT_QUOTES, 'effected_date'); ?>

    Regards

    brentwilliams2 Friend
    #493157

    My pleasure, Hero. As for this issue, removing that line just showed the plain html text with tags. But I found out what does work!

    <?php echo htmlspecialchars_decode($item->job_detail); ?>

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  brentwilliams2 11 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum