Skip to end of metadata
Go to start of metadata

Hi,

Using theme builder, I'm creating a simple to use Intranet system.

I would like to modify a page in a space I'm calling 'Homepage' so that it combines elements of the dashboard and other sections as follows:

Page Titile: HomePage
Contains: News & Recently updated pages

Is there a way to write custom code in theme builder for modifying only a single page? Such as writing CSS coding to say something like:

if page.title='homepage'

[Do This]

endif

Many Thanks!

Mo.

  • No labels

5 Comments

  1. Unknown User (mo)

    Help with this query would be greatly appreciated.

    I would basically like the home-page to include elements of the dashboard and the News Feed into one page.

    Even if you could suggest books or training coruses, where I could learn to do this would help.
    Mo.

    1. Unknown User (scayla)

      Hi,
      Have you tried the builder-show macro which is basically a "if" based on parameters you define eg :

      {builder-show:title=homepage}
      do this
      {builder-show}
      

      If it's not what you're looking for, may be creating your own user macro and playing with velocity would do the trick such as

      #if ($action.page && $action.page.title == "homepage")
      do this
      #end
      

      HTH

      1. Unknown User (mo)

        Hello Steeve Cayla,

        Thank you for your reply.

        I have looked into this Macro and yes, it is very useful - but was wondering if you could help me further.

        I would like to have the news feed on the left hand side of the HomePage and 'Recently Updated Spaces' on the right side.

        I have created a new layout for the HomePage space so I do not need to to the If command now as the HomePage will use a different layout.

        Could you help me out a little here please?
        Many Thanks,
        Mo.

        1. Unknown User (scayla)

          Not sure at all that this is what you want...

          {section}
          {column:width=50%}
          {blog-posts:spaces=@all}
          {column}
          {column}
          {spaces}
          {column}
          {section}
          

          Something like that in the page itself outputs on the left side the news, and on the right side the spaces (not recently updated spaces actually, couldn't find the macro).
          If you're looking for the news in the left panel, and the recently updated spaces in the right panel, enable the Left side bar in theme builder (defining also its width, padding, margin, etc) and put your content inside, same for the right sidebar with your other macro.
          I suggest you to have a deep look at the power of Theme builder in the documentation here. My guess is that all your questions are answered somewhere inside.

          Good luck ! (smile)

          Steeve

          1. Unknown User (mo)

            Hello Steeve,

            Thank you so much.

            I'd modified the code a little to give me all recently updated spaces on the right side of the page:

            {section}
            {column:width=50%}
            {blog-posts:spaces=@all}
            {column}
            {column}
            {recently-updated: spaces=*|showProfilePic=true}
            {column}
            {section}
            

            Best Regards,
            Mo.