Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6153785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:09:00+00:00 2026-05-23T20:09:00+00:00

i want to include design in all pages, for this i had set a

  • 0

i want to include design in all pages, for this i had set a master page layout, it works perfect.Then i want to add some portions to each page of my site,i am also done this by creating a utility page, but problem is repeats all contents. here is my code

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/data">

    <h1><xsl:value-of select="$page-title"/></h1>
<ul><xsl:apply-templates select="/categories/entry"/></ul>

</xsl:template>
<xsl:template match="categories/entry">
        <div class="left_wrap">

            <div class="large_video"><img src="{$workspace}/images/video.jpg" style="border:#393939 solid 1px;" /></div>
            <div class="title1">Categories<img src="{$workspace}/images/arrow.jpg" /></div>
            <div style="float:left; width:680px;">

                <div class="category_block">
                <div class="category_title"><xsl:value-of select="title"/></div>
                <div class="category_image"><img src="{$workspace}/images/politics.jpg" /></div>
                <div class="category_info"><xsl:value-of select="description"/></div>
                <div class="date"><img src="{$workspace}/images/time.png"  style="float:left;"/><p style="float:left; width:120px; margin-left:6px;">2 days ago</p></div>
                </div><!--category_block END-->

            </div>            
         </div> 
</xsl:template>


</xsl:stylesheet>  

I want to repeat only the “class=’category_block'” div ,but i need all other in this page. How is it possible in symphony?. Also i want to limit category description character count to 100 character in my home page, how can i limit it.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:09:01+00:00Added an answer on May 23, 2026 at 8:09 pm

    Firstly, is your <div class="left-wrap"> meant to be repeated for each category entry, or should it contain all categories? I’m going to assume the latter, as that seems to make most sense given what I’m seeing here.

    If that’s so, your data template should look like this:

    <xsl:template match="data">
        <h1><xsl:value-of select="$page-title"/></h1>
        <xsl:apply-templates select="categories"/>
    </xsl:template>
    

    That will match the categories node and allow you to set up the container for all your category entries:

    <xsl:template match="categories">
        <div class="left_wrap">
            <div class="large_video">
                <img src="{$workspace}/images/video.jpg" style="border:#393939 solid 1px;" />
            </div>
            <div class="title1">Categories<img src="{$workspace}/images/arrow.jpg" /></div>
            <div style="float:left; width:680px;">
                <ul>
                    <!-- This will be your repeating block -->
                    <xsl:apply-templates select="entry"/>
                <ul>
            </div>            
         </div> 
    </xsl:template>
    

    Now, when you’ve got more than one entry, whatever’s in the entry template below will be repeated for each:

    <xsl:template match="categories/entry">
        <li>
            <div class="category_block">
                <div class="category_title">
                    <xsl:value-of select="title"/>
                </div>
                <div class="category_image">
                    <img src="{$workspace}/images/politics.jpg" />
                </div>
                <div class="category_info">
                    <xsl:value-of select="description"/>
                </div>
                <div class="date">
                    <img src="{$workspace}/images/time.png"  style="float:left;"/>
                    <p style="float:left; width:120px; margin-left:6px;">2 days ago</p>
                </div>
            </div><!--category_block END-->
        </li>
    </xsl:template>
    

    Obviously, I’ve had to make some assumptions here, so let me know if this isn’t exactly what you’re after. Also, bear in mind that with XSLT there’s always more than one way to do something.

    Finally, you should consider cleaning up your markup a bit. Lots of extraneous, non-semantic divs and so on. Your <div class="title1"> should probably be a heading, for instance. Ditto the <div class="category_title">.

    To answer your last question about truncating the description, try this utility from the Symphony site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to include/embed an Excel worksheet with a predefined layout in an Excel
I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
I have a block of code like this: <Compile Include=Share\System\Master\Relative\RelativeList.aspx.designer.cs> <DependentUpon>RelativeList.aspx</DependentUpon> </Compile> <Compile Include=Share\System\Master\Status\StatusInfo.aspx.cs>
I want include the Type name of each object in my collection from my
I want to include validates_confirmation_of :password in a module but i keep getting errors
I want to include a folder in a setup project so that when I
I want to include a mini menu 20px by 20px images of potential backgrounds.
I want to include some dynamic part in the filename of the msi file
I want to include the last 2 files in my php file based on
I want to include a header file only if a certain function body is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.